Jump to content

Extract device information


dhl

Recommended Posts

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?

Link to comment
Share on other sites

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??

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by Tiger
removed link
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...