AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Limit length of an attribute value

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
jagielski
1841 Views, 4 Replies

Limit length of an attribute value

There must be a way to limit the length of a value used in an annotation template. I am labeling from an attached database and one of the attributes I am using is sometimes too long for the maps so I need to limit the number of characters used. Is there a way to limit character length when using a value attached from a database?

 

Thank you,

Kraig

4 REPLIES 4
Message 2 of 5
Murph_Map
in reply to: jagielski

Upload an example of the dwg and what field and the number of charathers you want. There may be a way. 

 

Murph
Supporting the troops daily.
Message 3 of 5
olivier.eckmann
in reply to: jagielski

Hi,

 

something like that

(substr XXXXX 1 (min 132 (strlen XXXXX)))

where XXXXX is the field you want to display and 132 (for ex) the max number of character you want.

 

Olivier

Message 4 of 5
jagielski
in reply to: olivier.eckmann

Olivier,

 

  

I modified the link and tried again. It doesn't like the min statement. For the (strlen XXXXXX) should the XXXXXX be my  link template value, or the value of the max characters desired?

 

I am using this statement -

 

(substr &GRANTEE@link 1 (min 32 (strlen &GRANTEE@link)))

 

When I use this statement I get a warning mesage that says "Unsupported operator specified in expression: min"

 

 

Kraig

Message 5 of 5
jagielski
in reply to: olivier.eckmann

Thank you for the help. I was able to work through this with a little guidance. This is what I came up with that works for me -

 

(substr &GRANTEE@link 1, 35)

 

 

1 being the min and 35 being the max for what I want.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost