Author: Viru
-
Identify if the DWG is saved by Autodesk software
By Virupaksha Aithal AcDbDatabase provides a API dwgFileWasSavedByAutodeskSoftware to identify whether the DWG file is saved by Autodesk software or not.
-
Detaching missing external reference files from side database
<?xml encoding=”UTF-8″>By Virupaksha Aithal Below code shows the procedure to detach the missing external reference files from a side database [CommandMethod(“DetachXref”)] public void detach_xref() { Document Doc = Application.DocumentManager.MdiActiveDocument; Editor ed = Doc.Editor; string mainDrawingFile = @”C:xrefRectHost.dwg”; using(Database db = new Database(false, false)) { try { db.ReadDwgFile(mainDrawingFile, System.IO.FileShare.ReadWrite, false, “”); } catch (System.Exception) { ed.WriteMessage(“nUnable…
-
How to make the plug-in commands not available in .NET
<?xml encoding=”UTF-8″>By Virupaksha Aithal Question: Recently I received a question on how to avoid exposing commands in the custom plug-in when the license verification fails.Answer: One of the procedure to achieve this requirement is to do license verification in IExtensionApplication.Initialize() and throwing an exception if license verification fails. After throwing exception, none of the commands…
-
Quit AutoCAD
<?xml encoding=”UTF-8″>By Virupaksha Aithal AutoCAD.NET API exposes “Application.Quit()” to exit the AutoCAD. However, “Application.Quit()” at present is unable to save all the user profile setting (like active ribbon tab ). One alternative approach for the issue is to use quit AutoCAD command through “SendStringToExecute” [CommandMethod(“quitACAD”, CommandFlags.Session)] static public void quitACAD() { //Quit AutoCAD Application.DocumentManager.MdiActiveDocument.SendStringToExecute(“quit “,…
-
Debugging AutoCAD 2017 using Visual Studio 2015
By Virupaksha Aithal At present, developers are unable to debug the .NET modules in AutoCAD 2017 with VS 2015. As explained in Kean’s article for VS 2013 http://through-the-interface.typepad.com/through_the_interface/2013/11/debugging-autocad-using-visual-studio-2013.html , the workaround for this issue is to either enable the native debugging or using the Compatibility mode in VS 2015. Turn on “Use Managed Compatibility Mode”…
-
Identify view change in AutoCAD
<?xml encoding=”UTF-8″>By Virupaksha Aithal I have received an query from an ADN partner recently on identifying the view change in AutoCAD, like when user pan or zoom using mouse. To identify the view change developers can use the editor rector viewChanged() (AcEditorReactor:: viewChanged()) in ObjectARX . However, in AutoCAD.NET API, the equivalent API is provided in…
-
AutoCAD Developer Documentation Survey
By Virupaksha Aithal AutoCAD customization documentation team is conducting the survey on AutoCAD Developer Documentation. This survey is to collect information about your impression of the developer documentation and to determine our priorities. I hope you’ll be willing to give few minutes of your time to take the survey – the results will be used…
-
Autodesk DevDays 2015 and (new this year) Accelerator week
Spend quality time in the cloud and learn where Autodesk is taking the desktop platforms in the coming year. The annual, global — and free Autodesk DevDays events will take place around the globe from November 2015 through to January 2016. In order to give developers more opportunity and to provide one-on-one help building apps…
-
CUI and images with transparency
By Virupaksha Aithal Till AutoCAD 2014, AutoCAD used to take only BMP format images in CUI. As BMP format doesn't work with transparency, AutoCAD used to interpret RGB color 192,192,192 as transparent. AutoCAD users had used this workaround in CUI. But the limitation of this approach is that the background color is fixed as 192,192,192.…
-
AutoCAD 2016: Trusted paths and AutoLoader
By Virupaksha Aithal In AutoCAD 2014, we introduced Trusted Locations (TRUSTEDPATHS). “Trusted Paths” are in concept a “white list” of locations that the CAD manager can audit and maintain for add-ins and customizations loaded into AutoCAD. AutoCAD allows signed files to be loaded from outside of this “whitelist” without SECURELOAD warnings, with the exception…

You must be logged in to post a comment.