vla-get-Perimeter...

Discussion in 'AutoCAD' started by 3ABTPA, Oct 15, 2004.

  1. 3ABTPA

    3ABTPA Guest

    Do I need to make a dummy region to use <vla-get-Perimeter> for a polyline
    (lwpolyline) perimeter calculation? When I use (vla-get-Perimeter <some vlax
    object polyline>) it returns an error. However If I make a region based on
    my polyline (lwpolyline) object the vla-get-Perimeter function works fine.
    Is there any direct way of getting polyline perimeter? I can calculate all
    vertexes' length separately including arches. Is this the only choose I
    have?
     
    3ABTPA, Oct 15, 2004
    #1
  2. 3ABTPA

    T.Willey Guest

    For polylines use vla-get-Length

    Tim
     
    T.Willey, Oct 15, 2004
    #2
  3. 3ABTPA

    Jeff Mishler Guest

    Plines don't have a 'length' property....
    Assuming you've got your pline as a VLA-OBJECT stored as 'ent':
    (setq endp (vlax-curve-getendparam ent)
    dist (vlax-curve-getdistatparam ent endp))
     
    Jeff Mishler, Oct 15, 2004
    #3
  4. 3ABTPA

    T.Willey Guest

    Select entity: ; IAcadLWPolyline: AutoCAD Lightweight Polyline Interface
    ; Property values:
    ; Application (RO) = #<VLA-OBJECT IAcadApplication 00b60584>
    ; Area (RO) = 1.89803
    ; Closed = -1
    ; ConstantWidth = 0.0
    ; Coordinate = ...Indexed contents not shown...
    ; Coordinates = (-12.8824 8.76075 -14.4679 8.76075 -14.4679 7.56362 ... )
    ; Document (RO) = #<VLA-OBJECT IAcadDocument 0106b690>
    ; Elevation = 0.0
    ; Handle (RO) = "9A"
    ; HasExtensionDictionary (RO) = 0
    ; Hyperlinks (RO) = #<VLA-OBJECT IAcadHyperlinks 2ae140c4>
    ; Layer = "AN_NOTE"
    ; Length (RO) = 5.56521 <---------------------
    ; Linetype = "ByLayer"
    ; LinetypeGeneration = 0
    ; LinetypeScale = 1.0
    ; Lineweight = -1
    ; Normal = (-1.22461e-016 5.43834e-032 -1.0)
    ; ObjectID (RO) = 2130456848
    ; ObjectName (RO) = "AcDbPolyline"
    ; OwnerID (RO) = 2130103560
    ; PlotStyleName = "ByLayer"

    Tim
     
    T.Willey, Oct 15, 2004
    #4
  5. 3ABTPA

    Jeff Mishler Guest

    OK, let me ephrase that...MY version of Acad (2002) does not have the length
    property on anything but a Line object.......
     
    Jeff Mishler, Oct 16, 2004
    #5
  6. I believe they added that length property
    in AutoCAD 2004
     
    Jason Piercey, Oct 16, 2004
    #6
  7. 3ABTPA

    Jürg Menzi Guest

    Hi 3ABTPA

    In addition to Jeff's answer I would propose to use always the vlax-curve-*
    stuff. In opposite to the 'Length', 'ArcLength', etc. properties you can
    get the length from *Polylines, Splines, Lines, Arcs, Circles and Ellipses
    with the same function.
    Note:
    Don't forget to initialize the ActiveX interface by (vl-load-com).

    Cheers
     
    Jürg Menzi, Oct 18, 2004
    #7
  8. 3ABTPA

    3ABTPA Guest

    Thank guys,
     
    3ABTPA, Oct 20, 2004
    #8
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.