ObjectARX2010 Learn Note 001: Create a line in a new database and save the database as a DWG file

Source: Internet
Author: User

    Static voidSwtarxproject5createline (void)    {        //Add Your code for command Swtarxproject5.createline here//Create a new CAD databaseAcdbdatabase *pdb=Newacdbdatabase (); //Defining a block table pointerAcdbblocktable *pblktbl; //Get block TablePdb->getsymboltable (Pblktbl,acdb::kforread); //defining block Table RecordsAcdbblocktablerecord *PBLKTBLRCD; //get block Table RecordsPblktbl->getAt (Acdb_model_space,pblktblrcd,kforwrite); //Close Block TablePblktbl->Close (); //Defining pointsAcgepoint3d PT (Ten,Ten,0); Acgepoint3d pt1 ( -,Ten,0); //define a line pointer and create a lineAcdbline *pline=NewAcdbline (PT,PT1); //add a line to a block table recordPblktblrcd->appendacdbentity (PLine); //turn off line and block table RecordsPline->Close (); PBLKTBLRCD-Close (); //Save a graphicPdb->saveas (_t ("C:/test. DWG")); //Delete a graphical database pointerDelete pDb; }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.