Checking for Prefix/Suffix on Dimensions

Checking for Prefix/Suffix on Dimensions

Anonymous
Not applicable
1,155 Views
2 Replies
Message 1 of 3

Checking for Prefix/Suffix on Dimensions

Anonymous
Not applicable

I currently have a code which uses dimoverride and dimpost to add prefix and suffix to dimensions.

 

The code is working fine, but the problem I'm having is that my code can only overwrite the current dimension value to have the suffix/prefix added on.

This means that if a suffix/prefix already exists on the dimension, and if I use this code, it deletes the old suffix and changes all with the new.

This is ok to some extent. But in some cases, I need the code to add the new suffix WITH the old suffix still existing.

To do this I need a way which lets me get the current dimension's suffix/prefix, and determine if its a suffix I would like to override, or add additional suffix to.

 

Can someone tell me how to get a dimensions suffix/prefix value? If I use VAL (CDR (ASSOC 42 (ENTGET EN))), it only gives me the value of the dimension, no suffix/ prefix. If I can get the value suffix/prefix still combined, it would be great.

MACRO or LISP is fine, and any help would be great.

0 Likes
Accepted solutions (1)
1,156 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution

It's a bit more complicated using just ename def. list

 

Much simpler would be to use just:

(getpropertyvalue (car (entsel)) "Suffix")

 

If you want to know the name some other property, use

(dumpallproperties (car (entsel)))

 

Message 3 of 3

Anonymous
Not applicable

Thank you so much!

This worked like a charm!

0 Likes