Draworder via AutoLisp?

Draworder via AutoLisp?

john.uhden
Mentor Mentor
1,051 Views
6 Replies
Message 1 of 7

Draworder via AutoLisp?

john.uhden
Mentor
Mentor

Might there be any ActiveX method to apply spatial indexing to objects?

Where I am working (YAY!) they are stiil using LDT3 (AutoCAD 2004).  Our civil drawings a very cluttered which affects legibility.  Alas, there is no background fill capability, so I was thinking of making my own using wipeouts and reactors.

Maybe even use same for things like water lines (-----------W------------) so we can move the "W" without breaking the line.  Now I have to remember if (command) or (vl-cmdf) can be used within a reactor.

John F. Uhden

0 Likes
1,052 Views
6 Replies
Replies (6)
Message 2 of 7

Kent1Cooper
Consultant
Consultant

@john.uhden wrote:

.... for things like water lines (-----------W------------) so we can move the "W" without breaking the line.  ....


 

For that part, maybe you can use LabelTextMask.lsp with its LTM command, available >here<.  It can put your [for example] W's at as many places along any kind of path object as you like, masked to visually interrupt the underlying path without breaking it, and each lined up with the path in the more-readable direction.  You can even change all manner of things about the text element [text content, Style, height, width factor, Layer] as you go, all within one running of the command [i.e. switch from W for Water lines to E for Electric lines, even if they should be on different Layers, etc.].  And when one doesn't come out as you want, you can Undo the last individual one placed, without  getting out of the command, and keep going.  [However, once placed, the text and mask are independent of the path, so if you Move a W and its mask to a different location along the path, it won't automatically re-align its direction, and if you change the route of the path, the texts and masks won't follow along on their own.]

Kent Cooper, AIA
0 Likes
Message 3 of 7

john.uhden
Mentor
Mentor

Wow.  Thanks, Kent.

I think I would take it a step further and associate the mask with the text object so that the user doesn't have to grab both to maintain their relative positions.  Hmm... 'twould be great for existing contour labels as well.  I suppose it could even work with attributes.  But my question still relates to the use of DRAWORDER.  I guess I can't get around using the command, right?

John F. Uhden

0 Likes
Message 4 of 7

Kent1Cooper
Consultant
Consultant

@john.uhden wrote:

....  I would take it a step further and associate the mask with the text object so that the user doesn't have to grab both....

Hmm... 'twould be great for existing contour labels as well.  ....


 

For the former, when I use it, and pick on a piece of Text afterwards, it "gets" both the Text and its mask together as a Group -- they are  associated.  Maybe you have something set differently than I do about Group selection, but I'll let you research that.

 

As for the latter, try LabelElevMask.lsp with its LEM command, available >here<, which pulls the elevation from each object for you, so you don't have to tell it the text content to use, and can label different  contours with different text values in one  running of the command.  But follow the instructions in the code [see Messages 8 & 9 there].

Kent Cooper, AIA
0 Likes
Message 5 of 7

john.uhden
Mentor
Mentor

Don't mean to hurt your feelings, but I despise AutoCAD groups.

I am much happier with reactors.

John F. Uhden

0 Likes
Message 6 of 7

dlanorh
Advisor
Advisor

@john.uhden wrote:

Might there be any ActiveX method to apply spatial indexing to objects?

 


 

https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/AutoCAD-ActiveX/files...

 

The above is for the MoveToTop Method. Also available are MoveAbove, MoveBelow and MoveToBottom Methods

 

They are a pain in the proverbial to use as you have to use a SortentsTable object.

 

I am not one of the robots you're looking for

0 Likes
Message 7 of 7

Kent1Cooper
Consultant
Consultant

@dlanorh wrote:
....

The above is for the MoveToTop Method. Also available are MoveAbove, MoveBelow and MoveToBottom Methods

 

They are a pain in the proverbial to use ....


 

If it's just a matter of moving selected object(s) to the top or bottom [it looks like those may have more sophisticated possibilities], you can use DrawOrderBackFront.lsp with its DB and DF commands, available >here<.  Again, John, they're not reactor-based, but they simplify the use of the DrawOrder command, and are certainly not a pain in the proverbial.

Kent Cooper, AIA
0 Likes