Hey!
I'm looking for a LISP that changes the orientation/alignment of an attribute from center left to center right.
Like a quick toggle.
So when its currently center left it gets set to center right and vice versa.
Maybe someone can help.
Solved! Go to Solution.
Solved by ВeekeeCZ. Go to Solution.
Possibly...
(defun c:AttJustLR ( / e j) (if (and (setq e (car (nentsel "\nAttribute: "))) (setq j (getpropertyvalue e "Justify")) ) (setpropertyvalue e "Justify" (if (= j 9) 11 9))) (princ) )
@thomas_schlüssi wrote:
- How would you change the lisp to be able to use it with multiple attributes at once?
No easy way - it's a nested object. You would need to select blocks (not atts directly) and somehow determine which atts should be justified. It could be by their tag or order in the definition. But all that requires much complex and lengthy code. So to reply to your naive question of how to change it? Remove it all and start over.
@thomas_schlüssi wrote:
- Where did you get the information from which number represents which text orientation? Is there an overview for this?
These newer functions g/setpropertyvalue are not so well documented. The easiest is to pick some existing object and dump all the properties by this line:
(dumpallproperties (car (entsel)))
If it's nested object, then nentsel.
Hi, its me again. 🙂
I use this LISP very often and have one more request.
Is it possible to use the LISP with multi-line attributes?
Can't find what you're looking for? Ask the community or share your knowledge.