Mline Coordinates

Discussion in 'AutoCAD' started by irfan, Dec 14, 2004.

  1. irfan

    irfan Guest

    Is it possible to get the coordinates of all the elements(lines) of an mline.

    mline.coodinates gives the cordinates that were used to create the mline.

    Is their any other way if it cant be done using mline properties.

    TIA
    Irfan




    Is it possible to get the cordinates of 'bottom' line.
    Cordinates property gives the cordinates that we have just input.

    In other words, i need to get the cordinates of all other elements of an mline.

    TIA
     
    irfan, Dec 14, 2004
    #1
  2. irfan

    David Kozina Guest

    This is not an easy question to answer.

    I don't believe the element coordinates have ever been 'exposed' for
    vba/activeX access.

    The DXF codes provide the means to *calculate* the element endpoint
    coordinates, I believe, but even so, to try and actually do so is more of a
    'fools rush in...' sort of thing. I tried it once and ran away. I may try
    again at some point in the future - I am particularly fond of mlines ;) -
    but I don't have any pressing need at the moment to do so.

    Could you explain why you need to do this? (I'm sure you have a good
    reason, but perhaps there is another way to reach your goal.)

    Sorry to not be of much help here,
    David Kozina
     
    David Kozina, Dec 14, 2004
    #2
  3. irfan

    irfan Guest

    thanks David for the reply

    Let me put it in a simple form as to why i need it:

    I am creating wall of a builiding using mline. As you know wall has external, central and internal edges, so i have used mline to create them in one go using 'justification' as 'zero'
    (ie; central line is my input cordinates).

    However, i need to get the coordinates of internal edges as well as external edges to do some more work , and hence the reason.

    I can use pline and offset it, but i dont want to start from the begening.

    TIA
    Irfan
     
    irfan, Dec 14, 2004
    #3
  4. irfan

    David Kozina Guest

    Just thinking out loud...
    MLines can be bhatched, if they create closed regions.
    If you did add a temporary hatch, could you then extract the vertices you
    need via the DXF hatch boundary Group Codes, then delete the hatch? Maybe
    not too efficient.

    Or - blow the dust off your trig books - dangerous calculation ahead,
    (sounds like what I was running away from earlier :)

    Probably not too helpful,
    David Kozina
     
    David Kozina, Dec 14, 2004
    #4
  5. Irfan, I believe the offsets are exposed via lisp...dxf, if not find your
    style, find the mln file, iterate text file to find your offsets...gl
     
    Paul Richardson, Dec 14, 2004
    #5
  6. Using the following lisp from the command line:

    (Entget (Car (EntSel)))

    and selecting an MLINE with a scale of 1.1313, I get the following:

    Select object: ((-1 . <Entity name: 7e53fab8>) (0 . "MLINE") (330 .
    <Entity
    name: 7d72dc10>) (5 . "3F77") (100 . "AcDbEntity") (67 . 0) (410 .
    "Model") (8
    .. "0") (100 . "AcDbMline") (2 . "STANDARD") (340 . <Entity name:
    7d72dd60>) (40
    .. 1.1313) (70 . 0) (71 . 1) (72 . 2) (73 . 2) (10 95.4143 -190.074 0.0)
    (210
    0.0 0.0 1.0) (11 95.4143 -190.074 0.0) (12 1.0 0.0 0.0) (13
    2.22045e-016 1.0
    0.0) (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -1.1313)
    (41 . 0.0)
    (75 . 0) (11 131.869 -190.074 0.0) (12 1.0 0.0 0.0) (13 2.22045e-016
    1.0 0.0)
    (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -1.1313) (41 .
    0.0) (75
    .. 0))

    Digging through that, I found that DXF code 40 contains what I believe
    you are looking for. Code 41 also has the scale listed but watch out
    for the duplicate values and 41 codes with zero values.

    Not a complete solution but I think it gets you closer to the finish
    line...

    Jim Dowthwaite
     
    jim.dowthwaite, Dec 14, 2004
    #6
  7. Using the following lisp from the command line:

    (Entget (Car (EntSel)))

    and selecting an MLINE with a scale of 1.1313, I get the following:

    Select object: ((-1 . <Entity name: 7e53fab8>) (0 . "MLINE") (330 .
    <Entity
    name: 7d72dc10>) (5 . "3F77") (100 . "AcDbEntity") (67 . 0) (410 .
    "Model") (8
    .. "0") (100 . "AcDbMline") (2 . "STANDARD") (340 . <Entity name:
    7d72dd60>) (40
    .. 1.1313) (70 . 0) (71 . 1) (72 . 2) (73 . 2) (10 95.4143 -190.074 0.0)
    (210
    0.0 0.0 1.0) (11 95.4143 -190.074 0.0) (12 1.0 0.0 0.0) (13
    2.22045e-016 1.0
    0.0) (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -1.1313)
    (41 . 0.0)
    (75 . 0) (11 131.869 -190.074 0.0) (12 1.0 0.0 0.0) (13 2.22045e-016
    1.0 0.0)
    (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -1.1313) (41 .
    0.0) (75
    .. 0))

    Digging through that, I found that DXF code 40 contains what I believe
    you are looking for. Code 41 also has the scale listed but watch out
    for the duplicate values and 41 codes with zero values.

    Not a complete solution but I think it gets you closer to the finish
    line...

    Jim Dowthwaite
     
    jim.dowthwaite, Dec 15, 2004
    #7
  8. Using the following lisp from the command line:

    (Entget (Car (EntSel)))

    and selecting an MLINE with a scale of 1.1313, I get the following:

    Select object: ((-1 . <Entity name: 7e53fab8>) (0 . "MLINE") (330 .
    <Entity
    name: 7d72dc10>) (5 . "3F77") (100 . "AcDbEntity") (67 . 0) (410 .
    "Model") (8
    .. "0") (100 . "AcDbMline") (2 . "STANDARD") (340 . <Entity name:
    7d72dd60>) (40
    .. 1.1313) (70 . 0) (71 . 1) (72 . 2) (73 . 2) (10 95.4143 -190.074 0.0)
    (210
    0.0 0.0 1.0) (11 95.4143 -190.074 0.0) (12 1.0 0.0 0.0) (13
    2.22045e-016 1.0
    0.0) (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -1.1313)
    (41 . 0.0)
    (75 . 0) (11 131.869 -190.074 0.0) (12 1.0 0.0 0.0) (13 2.22045e-016
    1.0 0.0)
    (74 . 2) (41 . 0.0) (41 . 0.0) (75 . 0) (74 . 2) (41 . -1.1313) (41 .
    0.0) (75
    .. 0))

    Digging through that, I found that DXF code 40 contains what I believe
    you are looking for. Code 41 also has the scale listed but watch out
    for the duplicate values and 41 codes with zero values.

    Not a complete solution but I think it gets you closer to the finish
    line...

    Jim Dowthwaite
     
    jim.dowthwaite, Dec 15, 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.