dhl Posted October 19, 2009 Posted October 19, 2009 Hi, I tried this query in the VBA, LISP customization forum and got referred to this one. I'm trying to figure out how I can extract information about electrical devices (eg style or dimension) and use this information in a lisp or vba routine. It seems as specific device info is not covered inside the DXF codes of a device, but rather some place MEP specific. Anyone know how? Quote
tzframpton Posted October 19, 2009 Posted October 19, 2009 I don't know if anyone that is a regular in this forum will be able to help you with customization with programming that ties in with the AEC side of AutoCAD. If you don't get any help here, try http://www.theswamp.org or the AUGI forums. Just curious, what exactly are you trying to do?? What is your final output that you're wanting?? Quote
dhl Posted October 19, 2009 Author Posted October 19, 2009 I trying to create a lisp routine that returns number of style specific devices inside a selection window. For instance if I have a device style named "circuit breaker type 1". I want to be able to select on instance of this device and select a window. The output should count the number of devices named "circuit breaker type 1" inside of this window and return this in a text string. I know how to create all but how to extract the style name of a device... Quote
Jacko93 Posted October 20, 2009 Posted October 20, 2009 I trying to create a lisp routine that returns number of style specific devices inside a selection window. For instance if I have a device style named "circuit breaker type 1". I want to be able to select on instance of this device and select a window. The output should count the number of devices named "circuit breaker type 1" inside of this window and return this in a text string. I know how to create all but how to extract the style name of a device... Have you tried using schedules? A schedule within AutoCAD MEP will read off pretty much any information you want it to. They can be tailored to whatever suits you. You can also then turn that into a table and extract the information into Excel. Does that help at all? Quote
Micaletti Posted October 28, 2009 Posted October 28, 2009 (edited) Most of the AutoCAD MEP objects are exposed via the .NET API, including electrical devices and their properties. VBA is being phased out in favor of the .NET API and is no longer pre installed with newer versions of AutoCAD. Have a look at the "sample" folder in your AutoCAD MEP directory. It contains many projects written in C# and Visual Basic to help get you started. Alternatively, Jacko93 is spot on about the schedules tables. They are extremely useful. Almost any data exposed via the .NET API can be extracted via schedule tables and exported to Excel. Steven Micaletti Virtual Mechanical Design Build Software & Content For AutoCAD MEP Edited April 20, 2012 by Tiger removed link Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.