Anuncios

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

Anonymous
2781 Vistas, 7 Respuestas

Diesel Expression to get y vlaue for mtext or text

Hi,

 

I was wondering if it's possible in ACAD for Mac to get the value for mtext or text in diesel expressions.

 

This will be useful for getting the height of elevations text.


Thanks.

maxim_k
en respuesta a: Anonymous

Welcome to Autodesk Forums!

Hi,

Could you explain how you want to use DIESEL expression and which one to accomplish your task?
Do you use AutoCAD LT?
If you are using full AutoCAD, you can use AutoLISP instead of DIESEL.

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
Anonymous
en respuesta a: maxim_k

ACAD LT. Sorry for not mentioning that.

 

If I place mtext or text with a field that has the required DIESEL exp. then,

 

it should display the y coordinate of the worlds y axis to display the elevation height of a window cill for example where the datum height is at y co-ordinate 0 therefore this displayis the cill height of the mtext with the Y coordinate value of the text.


And if I move the text the value updates depending on the y position. Hope this clarifies my requirement.

maxim_k
en respuesta a: Anonymous

Do you have such DIESEL expression at hand?
In theory you can use expressions in the fields in AutoCAD for Mac, but it is necessary to test it, because fields in AutoCAD for Mac are less functional than in PC version.

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
Anonymous
en respuesta a: maxim_k

I require the expression from someone as I don't know how to do it.
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
maxim_k
en respuesta a: maxim_k

If you want to learn more about DIESEL, I suggest you look at this website:

http://www.crlf.de/Dokumente/Diesel/Diesel.html

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
Anonymous
en respuesta a: maxim_k

Thanks, I thought DIESEL could get the coordinate of it's text.

 

 

I have created a dim style which does the same thing as I wanted (attached). Thanks for your help.