Long time reader, first time poster. Quick questions on getting started with .NET for AutoCAD. I have extensive experience with VBscript for Rhinoceros (Rhinoscript) and some with VB.NET for Grasshopper, though I always used the built-in script editor with GH and not Visual Studio.
AutoCAD user since R14, currently using AutoCAD 2013 and AutoCAD Architecture 2011 and 2013, Visual Studio Express 2010, Win 64 (ObjectARX 2011 & 2013)
So far I've found AutoCAD's ObjectARX documentation a bit opaque and a frustrating change from the transparency of Rhino's. I'm seeking a tutorial or some simple examples of file i/o methods, or just how to begin searching for the appropriate classes and methods, which .chm files to search, best practices. Seems like a lot of the sample code I've seen posted online is outdated for copy + paste between AutoCAD versions, especially with 2013 - sometimes just with using Win 64 and the ARX 2010 which I don't see available from Autodesk - and therefore requires a pretty thorough familiarity with where to start searching for replacements. I'm equally happy writing for 2011 or 2013, as long as it works.
My specific current issue deals with importing .dwg exports from Rhino / Grasshopper for making an architectural drawing set of a large building project. Specifically:
-Get a target string in filenames to search for. For example, string = "L001", "L002", etc
-Find all files in a parent directory with the target string. For example, "L001" would return "facade_L001.dwg", "reference_L001.dwg", "interior_L001.dwg", etc
-Xref all files containing this string into the current file
-Save current drawing as "filename_L001.dwg" and close
Scripting macros wouldn't work as I need variables and conditional execution.
Many thanks for any help out there. It's much appreciated.
Have you found the resources posted to www.autodesk.com/developautocad - particularly the AutoCAD .NET training material and accompanying 'DevTV' recordings. That same material will be covered in a weekly webcast series starting September 6th - see http://www.adskconsulting.com/adn/cs/api_course_sc
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register