AutoCAD 2010/2011/2012

Reply
Active Member
vogtc
Posts: 6
Registered: ‎10-02-2008
Message 1 of 5 (119 Views)

Text field that shows only portion of text

119 Views, 4 Replies
02-04-2013 09:06 AM

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"

Valued Mentor
tim.turner
Posts: 1,669
Registered: ‎04-26-2005
Message 2 of 5 (105 Views)

Re: Text field that shows only portion of text

02-04-2013 01:16 PM in reply to: vogtc

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)

Active Member
vogtc
Posts: 6
Registered: ‎10-02-2008
Message 3 of 5 (97 Views)

Re: Text field that shows only portion of text

02-04-2013 01:30 PM in reply to: vogtc

Thanks! Is there a way to use that on just a text object and not a ACAD variable?

Valued Mentor
tim.turner
Posts: 1,669
Registered: ‎04-26-2005
Message 4 of 5 (90 Views)

Re: Text field that shows only portion of text

02-04-2013 01:43 PM in reply to: vogtc

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?

Active Member
vogtc
Posts: 6
Registered: ‎10-02-2008
Message 5 of 5 (82 Views)

Re: Text field that shows only portion of text

02-04-2013 01:53 PM in reply to: tim.turner

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?

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community




Connect with AutoCAD

Twitter

Facebook

Blogs

Pinterest

Youtube