AutoCAD 2010/2011/2012 DWG Format
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Text field that shows only portion of text
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Is it possible to create a field that will show only a portion of the contents within an text object? Maybe using diesel or something?
Example:
There is a text object that contains "FIRST TEST", is it possible to create a field from that object that contains the first 5 letters of the text "FIRST". If the original text was changed to "SECOND TEST" the field would be updated "SECON"
Re: Text field that shows only portion of text
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
This diesel expression reads the 4th and 5th characters of the layout tab name. Change the variable and numbers to suit your needs. Caution; True View and I think LT also does not recognize diesel.
$(substr,$(getvar,ctab), 4,2)
Re: Text field that shows only portion of text
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Thanks! Is there a way to use that on just a text object and not a ACAD variable?
Re: Text field that shows only portion of text
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
In the diesel help there is only GETENV and GETVAR listed so AFAIK you can only get system and environment variables. Can you describe a little more in depth what you are trying to do?
Re: Text field that shows only portion of text
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I want the field to be linked to a piece of text, so that when I update the text the field will update with only part of the originally text.
Let's say I only want the second word of the text to display in the field.
"TEST ONE" - would display "ONE" in the field.
If I editied the text to "TEST TWO" the field would now display "TWO"
Hopefully that makes sense?

