Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

maxim_k
en respuesta a: Anonymous

I'm not sure about using fields in your case, because DIESEL cannot read object properties (Y value of insertion point of the text in your case).

But you can use this macro to put text strings which will contain Y coordinates of its insertion point:

 

^c^c-text;\;;$M=$(rtos,$(index,1,$(getvar,lastpoint)),2,2);

You can use CUI command to create new command macro with the code I wrote above, than assign this macro to the button on the Tool Sets palette.

When you will pick this button, AutoCAD will ask you to pick start point of the text, than it will create text with current text style and default text height and rotation angle and text contents will be the Y value of the point coordinates (in the current coordinate system) you picked.

 

You can fine-tune the format of the text (in my example I used decimal format with two decimal places accuracy) by alerting the last two numbers in the macro I marked in red bold.

The first number is for the display format (1: exponential, 2: decimal, 3: engineering, 4: architectural, 5: fractional).

The last number is for precision (number of decimals or lowest denominator).

 

 

Maxim


Do you find the posts helpful? "LIKE" these posts!
Have your question been answered successfully? Click 'ACCEPT SOLUTION' button.


Maxim Kanaev
Architect
MARSS

MacACAD | Linkedin

Etiquette and Ground Rules of Autodesk Community