Jump to content

Recommended Posts

Posted

Is there a way to easily add a leader (already created) to multiple instances of a Mtext? I have several 100 instances of a text string in a drawing that I'd like to add a leader to that refers to a note, ie. see note XYZ. I can successfully select the instances of the text string, but I can't seem to find a way to add the leader multiple times.

 

Your help is appreciated greatly!

 

farbar

Posted

let's move your question into the lisp forum :thumbsup:

 

you're not using LT are you?

Posted

Would you be able to post a simple diagram of what you are looking to accomplish?

 

Thanks :)

 

Lee

Posted

Here's a scree shot of what I'm doing. I have multiple instances of 2 symbols "CP" and "AV" that I'd like to add the "AV Note 1" and "AV Note 2" with a leader to throughout the document.

 

I originally created them (they're not currently Acad blocks) and used cut and paste to place them in each location. This is a plan drawing for an electrical contractor to install boxes for and audio visual installation.

 

Hope this helps!

CADTutorImage copy.jpg

Posted

I suppose you could have it so that the user would select each group of CV/AV, and the AV Note 2/3 leaders would be added upon selection.

 

Would you be able to upload the drawing - or a portion of it if there are copyright issues of some sort so that we can see how it is structured.

 

Thanks

Posted

if all other instances of this arrangement are identical, can you not construct the whole symbol/leader/note arrangement as a block and do a global replacement of the original block?

 

you should also be able to insert and explode into block and leaders again if I'm not mistaken (even if you have to place the new block on its own layer, switch the rest off, window and explode, then turn the other layers back on)

 

somebody else will have a more efficient suggestion I'm sure

Posted

It still needs somebody to fill in the details though Lee - if you'd like to do the honours

 

for instance, I suspect exploding blocks has a SETVAR somewhere which dictates how much exploding goes on in one action - so exploding with the wrong settings will result in the whole thing dropping out to lines and text - which isn't what we're aiming for here

Posted

If you make a block out of the leader, notes and the CV/AV block, copy to every necessary area, and then explode each time - it will only explode the block back down to its constituents - which is what we want.

 

Of course, if exploded further, the leader would break down etc etc.

 

Explode doesn't have many variables I don't think, only

 

"Explmode" which controls whether it can explode non-uniformly scaled blocks.

 

And also I think if you want to feed the explode command with a ss, you need to set "qaflags" to 1.

  • 15 years later...
Posted

Hi!

Almost entire 15 years later a similar issue was bugging me - i needed to add the same letter at the end of approximately 350 MText objects (in ZWCAD, but i am pretty sure my fix should work within AutoCAD as well), and, well, editing them one by one would not be reasonable. The fix:

  • select all the MText instances you need to edit - easiest way is to search with Find command and pick an instance, then select the critical properties of the object (for some reason layer doesn't work for me, but color does, which is what i generally use) and you should have all the similar objects selected (now you can group the instances for an easier selection later);
  • through the TCOUNT command add a number - either a prefix or suffix, the slightly annoying part - when picking a suffix or prefix the command also inserts a gap (space) within the MText, however that will not be an issue, rather an advantage in this case; a great feature using TCOUNT - you can set the numbering value and the step any number, including negatives AND zero (0), which is what you can use - pick a value and step 0, you'll end up with a numerical addition to your MText;
  • change the gap (space) and number with the symbol you need - return to the Find function and in the selection search for the gap+number (example: " 1") and simply replace all the instances within the selected MText instances.

No blocks, no scripts, modifications, difficult commands, AND while individual editing may take several hours (also depending no your device), this takes a few minutes at most.

 

Also, a little sidenote about TCOUNT function - this is arguably the best and simplest way to edit several numerical MText instances at once, and i've use it regularly; a word of caution - while there are several options on how to arrange the sequence (by selection order, x or y axis), by far the most reasonable are the axis ones, BUT you cannot change the direction of the axis in case you need the numbers to go the other way (for example, not 12345 but 54321). What you CAN do is start from the final value and pick a negative step. A slight hassle, but at least you can get the result.

 

Hope this helps someone! Cheers!

Posted

A few comments.

 

"select all the MText instances" why would you not use a ssget with filters ? You can select one mtext and retrieve the search filters Mtext & Layer & Color. 

 

Using "Tcount" I dont use that command but like others write my own version of it, you get the mtext string and add a number to it so prefix or suffix no spaces. You can do options like renumber, this will fill in gaps, find highest value and so on.

 

Sort on XY, ok hope this makes sense another post was label circles in a rectangle, the circles are parallel to the sides, BUT the rectangle is rotated, the solution is to temporarily rotate the rectangle to an Ortho angle, work out the XY order and then label. 

 

Negative result can be achieved by looking at the ssget or the sorted list of mtexts, so loop through from start to finish, or loop finish to start changing the mtext string and subtracting from num value. Note comment how many for highest value.

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...