Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Label 3d solid (pipe)

10 REPLIES 10
Reply
Message 1 of 11
JudyR
1721 Views, 10 Replies

Label 3d solid (pipe)

Does anyone know how to create a label for existing 3d Solid (3d pipes made with sweep and extrude)? I want the label to pull the layer name, color, pipe length automatically.

I would just do it manually but I need to label piping in an entire plant. 😞

 

Help

10 REPLIES 10
Message 2 of 11
dbroad
in reply to: JudyR

(getpropertyvalue <ename> "height") would return the height of an extrusion of a selected object

(getpropertyvalue <ename> "length") would return the length of the path for a sweep

 

I really cannot believe you are using 3d solids to model pipes for an entire plant though.  AutoCAD MEP would seem to be a much better choice for drawing piping, plumbing and controls for a plant IMO.

 

 

The functions listed above are only applicable for 2012 and higher.  There is no autolisp access to these properties in earlier versions AFAIK with either entget access or via activeX. For those versions you should consider .NET or Object Arx.

Architect, Registered NC, VA, SC, & GA.
Message 3 of 11
JudyR
in reply to: dbroad

3d pipes were already drawn in basic AutoCAD for the entire plant. I need to label, so we can place real life labels on the phyical pipes. (and know how many, type, size to order)

 

The previous labels (what there were) have faded and need replaced.

 

Thank you for your help.

Message 4 of 11
devitg
in reply to: JudyR

try DATAEXTRACTION or DX .
Message 5 of 11
JudyR
in reply to: devitg

I tried data extraction. It will give me a list of layer names and colors for 3d Solids. But I could not get lengths. I need lengths because we need to label every 50 feet. Also the engineer wants the pipes labeled to help the tech place the labels in the field.

 

I would just love it, if I could select the 3d solids and they would automatically label each pipe with the layer name, color and length (or just place the block label every 50 feet). Then I could extract the data from the blocks and the engineer could order the labels from that list. And I could generate a list for the tech of all the labels he would need in a given area. But I just don't know enough to write that program. 😞

 

Message 6 of 11
devitg
in reply to: JudyR

Pease, upload a sample dwg
Message 7 of 11
JudyR
in reply to: devitg

Attached is a sample of the piping I need to label. I have not officially started to label yet because I am still trying to find the best (easiest and quickest) way.

Message 8 of 11
devitg
in reply to: dbroad

When I use , at the DWG sample posted by OP

 

 

(setq 3d-solid (car (entsel)))
(setq 3d-solid-LENGTH(getpropertyvalue 3d-solid "length"))

 

 

I get this error

 

 

; error: ADS request error

 

 

 

 

 

What could it be?

Message 9 of 11
dbroad
in reply to: JudyR

I know of no way to automatically label these solids in a fully automatic way by using lisp.

 

These are the problems:

1) At least some of what should be extrusions or sweeps are neither.  That means properties like length and height are not part of the objects.

2) A program might look at each solid's boundingbox (2 points that define the mininum xyz and maximum xyz.  Unless all objects being tracked had a principle axis in either the x, y, or z direction however, then assuming the long direction would be the length would lead to errors whenever the pipes were not parallel to the x, y, or z axes.

 

I suggest you create a dimension style without dimension or extension lines and with the prefix and suffix text you desire and dimension the pipe lengths to get correct reporting.  It shouldn't be too difficult to get the job done quickly by using dimensions.

 

Time to earn your pay.

 

To determine the available properties for object themselves, you can use (dumpallproperties (car(entsel)))

Architect, Registered NC, VA, SC, & GA.
Message 10 of 11
SEANT61
in reply to: JudyR

Every pipe seems to have an associated axis:  Could a routine use those curves instead of the 3DSolids?


************************************************************
May your cursor always snap to the location intended.
Message 11 of 11
devitg
in reply to: JudyR

Hi JudyR , furthermore  than the all said here , your dwg is some like WEIRD , not all 3DSOLID have the LENGTH ,as value .

 

 

Please see a CSV in a TXT file where I show it .

 

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost