Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is there any way to have a block with editable fields mid MText?

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Dramatic_Iron
373 Views, 4 Replies

Is there any way to have a block with editable fields mid MText?

I'm looking to have this note with 3 editable variables streamlined for multiple uses throughout the same drawing:

Faith_DavisQQBEU_0-1723671029752.png

(sewer/gas/water would be the third)

 

I would like to be able to easily edit just those parts of the text in the block properties for easy repeated use in multiple scenarios with different values.

Faith_DavisQQBEU_1-1723671127537.png

 

I've tried making the attributes separately and placing them over empty spaces in the MText, but I need the words after the field to move with the input. I.e. the space needed to fit #1(SLOW LANE) is less than the space needed for #15(SLOW LANE). The text ends up overlapping, making this method unusable for mid sentence input. 

 

The reason it looks like I succeeded in inserting some fields is because I created attributes on a non plotting layer and inserted fields in the mtext linking to those objects>attribute definition(selected attribute)>value. However, this value is does not change outside of the block editor. It's always the default value of the attribute set from within the block editor and doesn't change based on the value outside the editor.

Faith_DavisQQBEU_6-1723672623325.png

Is there any way to get this to work?

 

I understand this may not even be possible but if anyone has any insight here, it would be greatly appreciated!

Thank you in advance.

4 REPLIES 4
Message 2 of 5

Mtexts can't reference attributes, however, attributes can reference other attributes. So what I would do is make one long multi-line attribute instead of the mtext, insert fields where necessary to reference your non-plotting attributes, and then the block should work like you want (unfortunately you will have to regen every time you change the attribute value).

 

One important caveat: for an attribute to reference another attribute, the block has to be "activated" as a dynamic block. This just means that a dynamic action has to be applied to the block, and changing the value of an attribute doesn't count. The easiest way to do this is to insert a visibility grip, add a visibility state, then close out of the block and change the visibility state. You only need to do this once for each block insertion and then the block is "activated" forever and you can delete the visibility grip. After all this is done, synchronize the block attributes, and you should be good to go.

 

Let me know if you need clarification on this process.

Message 3 of 5
jreidKVSUZ
in reply to: Dramatic_Iron

Here is block kind of like what Eli is saying but with a small change.

Don't worry about your spacing. Give enough room for 1 or 2 place.. if 3 is needed make room.

Same with the Feet. Make room. No one will care about the extra space.

I always change my Attributes a different color so they stand out for the Cadder but they plot the same color and thickness as the green text.

These are Middle Center inputs so they expand both ways into your space between the wording.

Copy this around all over, change its values when needed and should be good to go with your counts if you export out the attributes values to a spread sheet.

 

Hope this helps.

JRR!

Message 4 of 5

Hi! Thank you for this suggestion, it took a little figuring out but it ended up working exactly as needed.
Message 5 of 5
jreidKVSUZ
in reply to: Dramatic_Iron

Glad it is working for you.

If you don't mind, can you provide the drawing with some info to show us how it is working?

Thanks, JRR!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report