Jump to content

Block attribute in middle of sentence...?


Recommended Posts

Is it possible to insert an attribute within Mtext?

 

I am trying to create a block where part of a line of text will be an attribute and the other part constant.

 

Something like:

 

DESIGN BASED ON

::attribute: BY COMPANY NAME

 

The length of the attribute will vary, so 'BY COMPANY NAME' would have to shift left based on the number of characters. I would like to keep both lines of text Center Justified.

 

Is this possible? I can't seem to figure a way.

 

Thanks in advance

 

VB

Link to comment
Share on other sites

Welcome to the forum!

 

Yes you can. In the MTEXT or TEXT line, place the cursor where you want. Now, hit the Ctrl+F on the keyboard to bring up the FIELD Dialog box. Under "Field Category", select "Objects" in the drop down menu and select "Object" in the Field Names list. In the next column there's a button in which allows you to select an object. Use this to select the block, and you'll see a populated list containing various properties, which include the Attributes. It should be self explanatory from there.

 

Hope this helps. :)

 

-TZ

 

*EDIT*

After you have placed the fields you desire, and they change they will update automatically, however it requires a REGEN to see the change happen, since it's cached to show the previous value. Just FYI is all.

Link to comment
Share on other sites

Attribute definitions are not available outside of the block editor.

 

Why not simply put the "constant" text in a block, then add an attribute definition to the block for the "variable" line of text. Then insert it in your drawing as in this one attached below.

 

At one point you infer that the attribute is to be part of A line of text, and elsewhere you refer to "both lines". I assume that it is to be two lines of text and not one line.

 

Double click on any part of the block, and you can change the contents of the attribute including its text properties. To change the text properties of the first line you will have to use the block editor.

 

You do know that center justification will lengthen the text in the attribute in both directions, not just to the left?

 

I am not sure this will work for you, since the use of block attributes allows the content of the attribute to be different in each occurrence of the same block, rather than the same. I would think as in your example that the designer or architects name would remain the same anywhere within one drawing.

 

An example of a good use of a block attribute would be the drawing page number within a block that contains the page border and titleblock. This block then being inserted on each layout tab in paperspace, each insertion with a different page number.

TEXT BLOCK.dwg

Edited by Dana W
Link to comment
Share on other sites

Is it possible to insert an attribute within Mtext?

 

I am trying to create a block where part of a line of text will be an attribute and the other part constant.

 

Something like:

 

DESIGN BASED ON

::attribute: BY COMPANY NAME

 

The length of the attribute will vary, so 'BY COMPANY NAME' would have to shift left based on the number of characters. I would like to keep both lines of text Center Justified.

 

Is this possible? I can't seem to figure a way.

 

Thanks in advance

 

VB

 

I would add COMPANY NAME as a custom property name in a template created with the Express Tool PROPULATE. The value could be set with DWGPROPS and referenced by a field as part of an attribute. A custom property can even be used for searching in Windows Explorer: http://www.ellenfinkelstein.com/acadblog/find-drawings-by-specifying-drawing-properties/

After setting up my TomBeauford.prp template file I have a macro:

^C^C(command "Propulate" "A" "C:/Users/BeaufordT/AppData/Roaming/Autodesk/VLisp/TomBeauford.prp" "U" "C")

that runs PROPULATE command Updating the current drawing with my template file.

Link to comment
Share on other sites

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...