I have a block that uses an Attribute definition to create tags from target objects. How do I add a space and suffix to to the attribute so it will read as "1200 GPM". the numeric comes from info in another block, and the GPM is the suffix. Attached is an image of the block and language in the Attribute that allows it to pull the Target object info.
Solved! Go to Solution.
Solved by chrismunt. Go to Solution.
Morning.
Without actually seeing the original block file it's hard to tell for me. Have you tried to use two different Attributes? You can then left & right justify the text accordingly and leave a space as big as you want between the two.
Alternatively you could have the space built into the start of the suffix.
If it's a field, the "text" is just MTEXT, and you can manually edit it to add your text at the end
Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
It isn't Just text. I attached an image that shows its an Attribute Definition, With attribute code that pulls object info. For instance, the bottom line shows it pulls a GPM numeric from the object, however I want it to pull the gpm numeric, and then say gpm after.
I had it built into the suffix, but for some reason it just vanishes when inserted. I could try and send the block, but with out using it along side the object it is attached to it won't pull the GPM number.
If the "GMP" is a static code and doesn't need to be dynamic you would be best of splitting your attribute definition into two.
I would have the "Att def" (right justified) which pulls information from whatever object and a "Mtext" field (left justified) that remains static and always says GMP. By having them justified like this (see image) it doesn't matter how long the string of alphanumeric content is, the gap will be maintained.
This would work if you decided to have the suffix an "Att Def" also allowing you to change the suffix text. You would just need to have two Att Def boxes instead of one.
This was one solution I was able to come up with. The other was adding the space and suffix in the delimiter. The first day, for some reason it wasn't showing up, but the next day after a shutdown and restart it was. So, maybe plant needed a reboot to show the changes IDK. I'm doing a WHOLE lot of learning on different tasks all at once. I'll accept your solution for future folks. Since it did work also for me.
Can't find what you're looking for? Ask the community or share your knowledge.