Kinda off topic here .. but has anyone found a way to access the mtext object within an mleader without exploding?
Are the resulting MLeader components all on the same layer?
If so, isolate the layer, then:
PEDIT > M > Select all Exploded MLeaders > J > Enter > Enter
Kinda off topic here .. but has anyone found a way to access the mtext object within an mleader without exploding?
Kinda off topic here .. but has anyone found a way to access the mtext object within an mleader without exploding?
As far as I know, the MText content of an MLeader is not stored as a separate MText entity, but rather defined by the various DXF groups enclosed within the (300 . "CONTEXT_DATA{") section of the MLeader DXF data. I would assume that the MText entity is automatically generated using this data when the EXPLODE command is used.
Are the resulting MLeader components all on the same layer?
If so, isolate the layer, then:
PEDIT > M > Select all Exploded MLeaders > J > Enter > Enter
ok that helps - a little buggy but it got it done with a little doctoring up after.
Where there are multiple leaders it get a little confused.
I don't export dgns. We are paying this guy to "make" our dgns that we will then send to the dot...I know I know...I just does what I'm told.
Are the resulting MLeader components all on the same layer?
If so, isolate the layer, then:
PEDIT > M > Select all Exploded MLeaders > J > Enter > Enter
ok that helps - a little buggy but it got it done with a little doctoring up after.
Where there are multiple leaders it get a little confused.
I don't export dgns. We are paying this guy to "make" our dgns that we will then send to the dot...I know I know...I just does what I'm told.
I think it's silly that exploding an MLeader (with Mtext content) results in an MText entity, and exploded Leader(s), frankly.
You might consider looking into an MLeader's GetLeaderLineVertices Method, to essentially recreate an actual Leader entity, rather than just joining the resultant linework, etc.
HTH
Ok I know it's a bad bad idea to explode multileaders but I am giving my civil 3d dwgs to a microstation user for conversion and he has asked that I explode them. He has also asked that I pedit the leaders back into polylines - which turn into separate entities when you explode the multileaders. He is ok with the resulting multiline text from exploding the multileaders.
Code - Auto/Visual Lisp: [Select]
) ) )
Be careful when (entlast) is an attributed block or 2D/3D polyline.
Be careful when (entlast) is an attributed block or 2D/3D polyline.
Good catch; been a while since I did brute force Command calls.
... It (the code) should filter for "LINE" in this case. Code revised.
Cheers, mate.
Be careful when (entlast) is an attributed block or 2D/3D polyline.
Good catch; been a while since I did brute force Command calls.
... It (the code) should filter for "LINE" in this case. Code revised.
Cheers, mate.
Cheers - though, not so fast - what if the first entity added to the database following the explode is not a LINE...
Code - Auto/Visual Lisp: [Select]
) ) ) ) )
Edit: Nice setvar method there Lee 8-)I'm definitely going to try something like this in the future:
In addition to that, has anyone tried using (command "._explode" ss) on a selection set of multiple MLeaders, where at least one has BlockContent (instead of MText)?Yes, the block itself is not exploded. So the command version of this works as advertised.
I'm definitely going to try something like this in the future:Code - Auto/Visual Lisp: [Select]
A minor caveat: just ensure that any undo marks lie outside of the system variable changesYep! That's one of the reasons I prefer using the vla method to set undo marks - at least then it's possible to hide even that from the command-line. I suppose you could do it through 3 separate setvar sets, but IMO that's just being silly :laugh:
- Localisation prefixes are still required for command keywords, e.g. "_m"
BB, I think you're confusing prefixes. The hyphen is not a generic prefix, it's just a naming convention. The underscore is a true prefix, and it is required on command options in order to be locale independent.
Whereas, code that need only account for a single language, and uses spelled out Command options, will not break in the same version that breaks portability for the localised code. That's all I was trying to communicate... How one 'should' code is relative to one's product scope, IMO.
Whereas, code that need only account for a single language, and uses spelled out Command options, will not break in the same version that breaks portability for the localised code. That's all I was trying to communicate... How one 'should' code is relative to one's product scope, IMO.
You are mistaken in your assertion that not using the underscore prefix helps to avoid breaking changes. There is no such case. Therefore, writing locale-friendly code is always better.
How one 'should' code is relative to one's product scope, IMO.
I use the entire option "_undo" and not an abbreviation to avoid this kind of problems in my italian/english programs.Exactly! In the same idiom as
in this case, if compatibility with non-English versions of AutoCAD is achieved by simply inserting an underscore prefix, I see no reason to omit it.I see no reason to omit the underscore, neither do I see a reason to only send the capitalized letter of the option.
I appreciate your patience, while I struggle to wrap my head around this, guys.
I appreciate your patience, while I struggle to wrap my head around this, guys.
I've enjoyed watching you and other "amateurs" develop and grow. Just a few years ago, I was you. One of these days, you'll be the one whipping the young guys into shape. :police:
^
BB.... Just to give you a real life example -- Owen gave me a lot of help and also samples and review it those for me, when I started into the C++/MFC/and ObjectARX, some years ago, now I work doing software, for one of the big/best companies in the US.
So keep there and learn every day. :)
Have fun!
Luis.-
... wanted to pop in and say eureka I can just use the "burst" command to explode the mleader an not explode the leader. Mission accomplished.