Anuncios

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

Diesel Expression to get y vlaue for mtext or text

Anonymous

Diesel Expression to get y vlaue for mtext or text

Anonymous
No aplicable

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.

0 Me gusta
Responder
Soluciones aceptadas (1)
2.776 Vistas
7 Respuestas
Respuestas (7)

maxim_k
Consultant
Consultant
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
0 Me gusta

Anonymous
No aplicable

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.

0 Me gusta

maxim_k
Consultant
Consultant
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
0 Me gusta

Anonymous
No aplicable
I require the expression from someone as I don't know how to do it.
0 Me gusta

maxim_k
Consultant
Consultant
Solución aceptada

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
Consultant
Consultant
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
0 Me gusta

Anonymous
No aplicable

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.

0 Me gusta