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: 

Annotation Template

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Anonymous
662 Views, 10 Replies

Annotation Template

I need to write an annotation template of a field comprised of 10 digits.  How would I go about writing it just using that last five digits? Any help would be greatly appreciate it!!!

 

Thanks a million!

10 REPLIES 10
Message 2 of 11
Murph_Map
in reply to: Anonymous

Look at the substr function.  

Example  (substr :Field@ODtables 6) 

 

Murph
Supporting the troops daily.
Message 3 of 11
Anonymous
in reply to: Murph_Map

I will! Thank you, Murph.

Message 4 of 11
Anonymous
in reply to: Anonymous

 I have tried but no success. The field looks like this: APINUM@well225b. Is this how I should write the function: SUBSTR: (APINUM@WELLB, -5, 5) ? The field is 10 digits long.   Thanks!

Message 5 of 11
Murph_Map
in reply to: Anonymous

Try (substr :apinnum@wellb 6)



Sent from the Samsung Galaxy Rugby Pro, an AT&T LTE smartphone
Murph
Supporting the troops daily.
Message 6 of 11
kajar
in reply to: Murph_Map

Murph, can you also tell me how to annotation expression looks like when I want to use operators like / or * in expressions.

I want that text height is coming from object data numeric field and I need formula to divide value or multiply it. I tried (:od_field@ann_template)/2 or *2 not working also tried without parentheses.

Message 7 of 11
Murph_Map
in reply to: kajar

The value  in the OD may be a number but is it a integer or real?  Look at the field in the OD definition and see if its a CHARACTER or REAL or INTEGER. If it's a character you need to use ATOF or ATOI to convert the "string" to a number that can be divided or mulitplied. 

Look at the help topics  Functions Reference (AutoLISP). 

 

Murph
Supporting the troops daily.
Message 8 of 11
kajar
in reply to: Murph_Map

Data type is REAL. I cant get this working. How corect expression must looks like when lets see I want to divide object data real number data field(od_field).  

Which variant is correct:

  1. (:od_field@od_table)/2
  2. :od_field@od_table/2
  3. (:od_field@od_table/2)

 

Message 9 of 11
Alfred.NESWADBA
in reply to: kajar

Hi kajar,

 

as you see in your post there are a lot of smileys as characters used in your text like  this ( and that :  results in that smiley  (:

You have the option to use the "Insert Code" button (in the top line of that rich text editor with this icon:  {i}   and all within that part will not be converted to smileys.

 

At least it's like LISP is working and the formulas for division is like that:


( / 4 2) 'which means 4/2

Look to more details >>>here<<<.

 

-.alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2024
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 10 of 11
Murph_Map
in reply to: kajar

 

here is one example of divisions. 

( / :LENGTH_MI@strts_clarksville 2 )

This divides the value of Length_mi in the OD table strts_Clarksville by 2 .  

Murph
Supporting the troops daily.
Message 11 of 11
kajar
in reply to: Murph_Map

Thanks a lot!

I get it working, there was one missing space after /.

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

Post to forums  

Technology Administrators


AutoCAD Beta