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.
(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.
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.
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.
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.
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?
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)))