Author: Viru
-
SystemVariableEnumerator – new class in AutoCAD 2015
By Virupaksha Aithal SystemVariableEnumerator class provides a way to iterate over all of the public system variables and get their names, data type, range (if applicable), read-only status, and how they are stored. In ObjectARX this call is represented by “AcEdSysVarIterator” [CommandMethod("SysVarListTest")] public void SysVarListTest() // This method can have any name { Document…
-
Audit API – New in AutoCAD 2015
By Virupaksha Aithal From AutoCAD 2015, you can programmatically audit the drawing file using the new Database API “Audit” . You can also try fixing the issues in the drawing file using API’s argument. This API is present in ObjectARX and .NET. In ObjectARX – use Acad::ErrorStatus acedAudit(AcDbDatabase* , bool , bool ) API. [CommandMethod("AuditTest")]…
-
Recover API – New API in AutoCAD 2015
By Virupaksha Aithal A long time request by developer community is to recover the drawing files through API. That request has been addressed in AutoCAD 2015. Now, document collection class has a new API “AppContextRecoverDocument” which takes the name of the drawing file to recover. This API is present in ObjectARX and in .NET. In ObjectARX…
-
Setting hyperlinks to attribute reference
By Virupaksha Aithal At present, the hyperlink set at a block reference is not getting reflected in attributes associated with block reference. One workaround for this issue is to set the hyperlinks to the associated attributes separately as shown in the below code. [CommandMethod("SetHpLinkToAttRef")] static public void SetHpLinkToAttRef() { Document doc = Application.DocumentManager.MdiActiveDocument; Database db…
-
How to exit “Editor.GetSelection” on keyword selection
By Virupaksha Aithal One way to exit the “GetSelection” API on keyword selection is to throw an AutoCAD exception from the keyword press event handler. Below is a sample example of the procedure. On press of any keyword, below code throws the “Autodesk.AutoCAD.Runtime.ErrorStatus.OK” exception passing the keyword pressed. This exception is handled in the code…
-
Rename layout
By Virupaksha Aithal You can use LayoutManager class function RenameLayout to rename the layouts. Below code shows simple example showing the renaming of the layout. [CommandMethod("RenameLayout")] static public void renamelayoutName() { Document doc = Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed = doc.Editor; //get the Layout name PromptStringOptions opts = new PromptStringOptions("Enter Layout name to…
-
Updated HLR modules for AutoCAD 2008/2009/2010 – 64 bit
By Virupaksha Aithal There were issues with 64 bit version of HLR API in AutoCAD 2008/2009/2010. below are the updated modules. HLR for AutoCAD 2008 HLR for AutoCAD 2009 HLR for AutoCAD 2010
-
AutoLISP Documentation Updates – Windows and Mac
By Virupaksha Aithal Our documentation team has made number of changes as part of the AutoLISP documentation. For details refer blog post http://hyperpics.blogs.com/beyond_the_ui/2013/10/autolisp-documentation-updates-windows-and-mac.html
-
In-place edit of external reference drawing files
By Virupaksha Aithal Below code shows the procedure to edit of external reference drawing file. for this purposes, code uses “XrefFileLock” class which handles the management of Xref file locking. [CommandMethod("editexref")] static public void editexref() { Document doc = Application.DocumentManager.MdiActiveDocument; Database database = doc.Database; XrefGraph mXRefTree = database.GetHostDwgXrefGraph(false); Database xrefDatatbase = null; XrefGraphNode xgn =…
-
Remove vertices from 3d Polyline
By Virupaksha Aithal Below code shows the procedure to remove the user specified vertex of AutoCAD 3d Polyline. Code, first traverse through the vertices of the user selected 3d Polyline and prepares a list of vertexes to be erased. [CommandMethod("Remove3DVertex")] static public void RemoveVertex() { Document doc = Application.DocumentManager.MdiActiveDocument; Database db = doc.Database; Editor ed…

You must be logged in to post a comment.