• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Visual LISP, AutoLISP and General Customization

    Reply
    Member
    Posts: 4
    Registered: ‎04-30-2012

    Label 3d solid (pipe)

    384 Views, 10 Replies
    04-30-2012 02:35 PM

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

     

    Help

    Please use plain text.
    *Expert Elite*
    Posts: 848
    Registered: ‎08-16-2007

    Re: Label 3d solid (pipe)

    04-30-2012 04:21 PM 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.

    Please use plain text.
    Member
    Posts: 4
    Registered: ‎04-30-2012

    Re: Label 3d solid (pipe)

    04-30-2012 05:29 PM 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.

    Please use plain text.
    Distinguished Contributor
    Posts: 1,596
    Registered: ‎03-14-2004

    Re: Label 3d solid (pipe)

    04-30-2012 05:49 PM in reply to: JudyR
    try DATAEXTRACTION or DX .
    Please use plain text.
    Member
    Posts: 4
    Registered: ‎04-30-2012

    Re: Label 3d solid (pipe)

    04-30-2012 07:12 PM 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. :smileysad:

     

    Please use plain text.
    Distinguished Contributor
    Posts: 1,596
    Registered: ‎03-14-2004

    Re: Label 3d solid (pipe)

    04-30-2012 08:57 PM in reply to: JudyR
    Pease, upload a sample dwg
    Please use plain text.
    Member
    Posts: 4
    Registered: ‎04-30-2012

    Re: Label 3d solid (pipe)

    05-01-2012 06:36 AM 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.

    Please use plain text.
    Distinguished Contributor
    Posts: 1,596
    Registered: ‎03-14-2004

    Re: Label 3d solid (pipe)

    05-01-2012 11:57 AM 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?

    Please use plain text.
    *Expert Elite*
    Posts: 848
    Registered: ‎08-16-2007

    Re: Label 3d solid (pipe)

    05-01-2012 12:17 PM 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)))

    Please use plain text.
    Valued Contributor
    Posts: 90
    Registered: ‎09-23-2008

    Re: Label 3d solid (pipe)

    05-02-2012 01:47 AM in reply to: JudyR

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

    Please use plain text.