Autocad.net Arc radius Callout Extension Cable

Source: Internet
Author: User

#region Register RegApp public static void Checkregapp (String regapptablename) {Database db                       = Hostapplicationservices.workingdatabase; using (Transaction trans = db). Transactionmanager.starttransaction ()) {regapptable apptbl = trans. GetObject (db.                Regapptableid,openmode.forwrite) as regapptable; if (!apptbl.has (Regapptablename)) {Regapptablerecord apptblrcd = new Regapptablerecord (                    );                    Apptblrcd.name = Regapptablename;                    Apptbl.add (APPTBLRCD); Trans.                Addnewlycreateddbobject (APPTBLRCD, true);            } trans.commit ();        } return; } #endregion [Commandmethod ("Mydra")] public static void Mydra () {//Get current database do            Cument Acdoc = Application.DocumentManager.MdiActiveDocument; Database Accurdb = acdoc.database;            Start a Transaction start transaction using (Transaction Actrans = AcCurDb.TransactionManager.StartTransaction ())                {//Open the Block table for read in read mode blocktable acblktbl;                ACBLKTBL = Actrans.getobject (Accurdb.blocktableid, openmode.forread) as blocktable; Open the Block table record model space for write/Modelspace Blocktablerecor                D Acblktblrec; Acblktblrec = Actrans.getobject (Acblktbl[blocktablerecord.modelspace], openmode.forwrite) as BlockTableReco                Rd                Create the radial dimension creates a radius callout radialdimension Acraddim = new Radialdimension ();                Acraddim.center = new Point3D (0, 0, 0);                Acraddim.chordpoint = new Point3D (5, 5, 0);                                Acraddim.leaderlength = 5;              Acraddim.dimensionstyle = Accurdb.dimstyle;  Add new objects to model space and transaction Checkregapp ("Acad_dstyle_dimradial_extension");//Custom Function checks if RegApp name exists, does not exist                Add regapp name Resultbuffer resbuf = new Resultbuffer ();                Resbuf.add (New Typedvalue ((int) dxfcode.extendeddataregappname, "acad_dstyle_dimradial_extension"));                Resbuf.add (New Typedvalue ((int) dxfcode.extendeddatainteger16, 387));                Resbuf.add (New Typedvalue ((int) dxfcode.extendeddatainteger16, 1));                Resbuf.add (New Typedvalue ((int) dxfcode.extendeddatainteger16, 388)); Resbuf.add (New Typedvalue ((int) dxfcode.extendeddatareal, 6.26953));//Start Angle Resbuf.add (New Typedvalue ((int) Dx                FCODE.EXTENDEDDATAINTEGER16, 390));                Resbuf.add (New Typedvalue ((int) dxfcode.extendeddatareal, 2.67146));//End angle Acraddim.xdata = resbuf;                Acblktblrec.appendentity (Acraddim);                            Actrans.addnewlycreateddbobject (Acraddim, true);    Commit changes, close transaction actrans.commit (); }        }

  

Autocad.net Arc radius Callout Extension Cable

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.