Dynamic Block editing text

Dynamic Block editing text

JtotheW
Contributor Contributor
6,570 Views
17 Replies
Message 1 of 18

Dynamic Block editing text

JtotheW
Contributor
Contributor

Hi All,

 

I have created the attached dynamic block. I stacked all the blocks on top of each other so that the insertion point is always the same.

 

Then I realised that the I had failed to consider changing the text. The 4 text entities will almost always need to be edited. 

 

Is there an efficient way of enabling text edit for this. Any help would be great as I've spent much of my morning trying to amend this with Attribute Definition etc but without much success.

 

Kind regards

Jon 

0 Likes
Accepted solutions (1)
6,571 Views
17 Replies
Replies (17)
Message 2 of 18

Anonymous
Not applicable

Attributes are the best way to do this.

I would help you but I don't understand exactly what problem you are having and I will not open your drawing due to the attached warning AutoCAD prompted me with when trying to open your file. nope.PNG

 

If I were to guess at what problem you're having without opening the drawing and based on the description you provided. I would say you are trying to edit nested attributes? If you have a block within a block this is what I am talking about. The attribute has to be on the top most layer of the block. Think of it like the layers of an onion. ("SHREK" reference Smiley Wink)

 

Regards,

Josh

0 Likes
Message 3 of 18

JtotheW
Contributor
Contributor

Ah I see, Thanks Josh 

 

I often receive error messages and usually switch off to it and I know I shouldn't. I work for a big Telecoms company which pay for the use of licences for Full AutoCAD 2018 so there is nothing negative going on. However I'm just the same and would not open that file either.

 

Please see attached Dynamic Block 2. That one will not contain any error messages.

 

Kind regards

Jon

Message 4 of 18

Anonymous
Not applicable

Understandable. I am on my company's network so I take no risks when opening files. Now that I can see what is going on I just need a little more information from you.

In the following example from your block, what variables need to be editable and what is a constant here?

Or are they all supposed to be editable? ("N01", "R", "R", "FUTURE GROWTH") 4 ATTRIBUTES

f.PNG

0 Likes
Message 5 of 18

JtotheW
Contributor
Contributor

They should all be editable. It is often custom text that is input.

 

Example N01 is the location which could be A01, A02, F12 or even 101/201 etc etc.

 

The Future growth text is what's in that location which can vary.

 

Sometimes the F & R are swapped between themselves also.

0 Likes
Message 6 of 18

Anonymous
Not applicable

Here is what I have so far. You should be able to finish from here if you can understand how I got here.

I am not sure what is wrong with the attributes in your block to be honest. Something screwy is happening and for me it seems much quicker to just start from scratch. Your approach may have been off too which may have contributed to some of the errors. See the attached example for the best way to accomplish this task in my opinion. A big factor is only having those 4 attributes and moving them when needed instead of copying them and hiding them. You cant repeat tag names which might be why you're having an error, I haven't check i just thought of this now.  

If you have any questions on how I got to this point please ask and I will be glad to answer (:

 

Regards,

Josh

Message 7 of 18

Anonymous
Not applicable

As a note. I haven't done anything with the visibility parameter in that block yet. The only thing that would go here is the colors. 

0 Likes
Message 8 of 18

JtotheW
Contributor
Contributor

I'm embarrassed to say but how do I download the DYNAMIC Block 2-RESPONSE.dwg file?

 

I do not see an option to select it or download attachment etc

0 Likes
Message 9 of 18

JtotheW
Contributor
Contributor

No no, I have now downloaded it. I think my browser is not up to date. Please ignore my previous message.

0 Likes
Message 10 of 18

Anonymous
Not applicable

Have you had time to review the example block?

Do you need any further explanation on how to accomplish this task?

 

Please mark the solution if it solves your problem to help others in the future 

0 Likes
Message 11 of 18

JtotheW
Contributor
Contributor

Hi Josh,

 

I have reviewed what you have sent me, I think the lookup table may be useful but I need to continue with some trial and error to see if its a workable thing. Thank you for your efforts.

 

I took a second pass and swapped out the MTEXT entities for Attributes. In the hope of being able to edit them. However I have found that I have duplicate tags appearing in the Attributes which appear to be causing me an issue. I considered re-working the tag names but I have encountered a second Issue. I have found that the Attribute/text will not display in the drawing. And I cannot pick it to change it? I have changed the draw order and played about with it without much success.

 

So unless anyone has any better idea's then I am opting for removing the attributes and text from the block and then just place text on top of the block each time. Which will not be a swish, but it will be useable.

 

Kind regards

Jon

 

0 Likes
Message 12 of 18

h_s_walker
Mentor
Mentor

Your attributes need to have different tags for each 1

 

eg you cannot have two RACK_CONTENTS tags

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.

EESignature


Left Handed and Proud

Message 13 of 18

Anonymous
Not applicable
Accepted solution

I am sure that this is the way to go. I have finished the block and attached it.

Please let me know if need any further guidance or if this block fits your needs!

I could't walk away after you said that you would be manually placing the text every time lol Smiley LOL

Side note: I'm curious what this block is used for. What do you do?

 

Regards, Josh

R1.pngR2.png

 

 

0 Likes
Message 14 of 18

JtotheW
Contributor
Contributor

 

Wow thanks Josh. I am impressed and yes this is fit for purpose. Just one slight change. The three "Text goes here" entities, could those be replaced or combined onto just one entity with wrap text?

 

Moon.PNG

🙂

 

This has been my first meaningful Dynamic block experience and I have got a lot to learn obviously. I wish I knew the steps that you followed to get there, but I will take an additional copy to tinker with so then I can edit / create similar Dynamic blocks in the future. The Lookup's you added look like they could assist me with other tasks in the near future. 

 

These are to show the footprint position of one of our customers kit in room layouts. The colours show the current state of the footprint.

 

Kind regards

Jon

0 Likes
Message 15 of 18

h_s_walker
Mentor
Mentor

Here you go. It just needed one of the attributes changed to a multiline attribute and the others removed

 

 

 

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.

EESignature


Left Handed and Proud

Message 16 of 18

Anonymous
Not applicable

Unfortunately I think attributes are one line only and it seemed you would be using more than one in most cases.

I could be wrong about that though. I'm glad I was able to help! I use block religiously in my work. I seem to only become more obsessed with them the more than I learn so I highly recommend you spend the time to learn something new about them here and there.

This block is a pretty basic example of multiple visibility parameter work-around which is talked about a lot on the forum. Something useful to look up when you have the time.

0 Likes
Message 17 of 18

Anonymous
Not applicable

I can't believe I didn't know about multi line attributes. I have several blocks I need to update now. You learn something new everyday Smiley LOL

Message 18 of 18

JtotheW
Contributor
Contributor

Thanks everyone 🙂