Mline Coordinates

Mline Coordinates

Anonymous
Not applicable
1,306 Views
5 Replies
Message 1 of 6

Mline Coordinates

Anonymous
Not applicable
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
0 Likes
1,307 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
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 "irfan" wrote in message news:490830.1103018309108.JavaMail.jive@jiveforum2.autodesk.com... > 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
0 Likes
Message 3 of 6

Anonymous
Not applicable
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
0 Likes
Message 4 of 6

Anonymous
Not applicable
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 "irfan" wrote in message news:26463960.1103040778635.JavaMail.jive@jiveforum2.autodesk.com... > 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
0 Likes
Message 5 of 6

Anonymous
Not applicable
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 "irfan" wrote in message news:26463960.1103040778635.JavaMail.jive@jiveforum2.autodesk.com... > 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
0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor

You can get at the mline offsets and you are right use offsets to get the co-ords of the new plines.

 

maybe start with this.

(setq objdict (namedobjdict))
(setq mldict (dictsearch objdict "ACAD_MLINESTYLE"))
(setq mlineStd (dictsearch (cdr (assoc -1 mlDict)) "Standard"))
(setq offs (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= (car x) 49)) mlinestd)))
; offs are 
0 Likes