Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Field expression command syntax reference?

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Coffee_Aided_Design
376 Views, 7 Replies

Field expression command syntax reference?

Diesel expressions have a nice reference guide here (https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-F94A885A-4DA2-432B-AC1A-EB49CC6C1C72).

 

Are there any guides like this for field expressions? I would like to experiment with more advanced field expressions but I can't find any reference material about the syntax. This is an example of what I'm talking about:

 

%<\AcObjProp Object(%<\_ObjId 1722057714944>%).Area \f "%lu6%qf1">%

 

I've experimented with the object properties and it doesn't seem like all properties are available. How would I figure out how to use this syntax and what properties it supports?

 

Labels (1)
7 REPLIES 7
Message 2 of 8

Hi,

 

do it further, check out all possible settings to how the code looks like.

That's the easiest way.

 

For non pre-defined (offered) object properties, take a look to your help[f1],

Object model activex

 

On the the right, click on the object type, then search for your property name.

For Mtext: check out the difference between TEXT and TEXTSTRING 

 

How to test: Create a field code for Mtext content,

Copy the code and change the property name in notepad.

Paste the new code to the same drawing.

Sebastian

Message 3 of 8

@cadffm , this is great. I had no idea that I could just paste the field syntax directly into Mtext, this will save me some time. That object model diagram is really useful.

 

What do you mean about the difference between TEXT and TEXTSTRING, I found the property but I'm not sure what you wanted me to know.

 

Also, I would like to understand the syntax more, you helped me with the available properties but I would still like to know what these parts mean (highlighted):

Coffee_Aided_Design_0-1731951906253.png

 

First, I imagine  "%<\" (green) just tells Autocad that this is a field. Is there a section of the documentation that describes this? Does the sequence of code have a name? Second, I've only ever seen "AcObjProp" and "Object" get used (pink and yellow) are there other options and is there a list somewhere? Finally the "\f" (blue) is for formatting but I don't know where to find the options in the documentation. Does this part of the code have a name? Are there other options besides "\f"?

 

Thank you 🙂

 

 

 

Message 4 of 8

This link though applies to Bricscad is similar with AutoCAD contains explanation for what you're asking for including a section under FORMATTING:

https://www.bricsys.com/en-eu/blog/coding-with-field-text-customizing-bricscad-p20?srsltid=AfmBOoowA...

paullimapa_0-1731953910274.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 8

@paullimapa, wow this is the sort of documentation I was looking for, great job Brics. The syntax is nearly identical, are fields part of the Open Design Alliance standards?

 

Thanks!

Message 6 of 8

no idea if field formatting are part of the Open Design Alliance standards


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 7 of 8

Hi,

MTEXT sampe / TEXT and TEXTSTRING

Create an Mtext with two words, inside Mtexteditor change the color of one of them.

Close editor.

Now, create a field to read the Content (will read the textstring - see the fieldcode)

Create an edited fieldcode, replace textstring property with text property - and you will see the difference.

 

 

 

Paste fieldcode: You can also paste a code directly to the modelspace and at some other places too, not just in  the mtext editor.

 

Documentation.

Thats why I wrote, use the field dialog to create a fieldcode and watch the code.

Every setting have another code (not documented from Adesk).

Read from sysvar, read from Object, Formular... ALL kind, property and format  have a special code.

The way to go thru field editor and checking the code is fast as possible, no need for a documentation (my opinion).

 

 

 

 

Sebastian

Message 8 of 8

@cadffm, yes I see the difference between TEXTSTRING and TEXT now.

 

Thanks for confirming that the documentation is lacking and also giving me some things to try. Sometimes it's just best to experiment.

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report