- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a few simple blocks with a single attribute. I use an Auto Rotate program to insert the blocks and have them snap to a line or arc. The basic idea is that the block is then aligned to the line/arc and I dont need to rotate it further. In this function, I use (AlignAtts (ENTLAST) 0.0) to set the attribute to "proper" alignment. In my current situation, this is working great as long as the line Im snapping to is vertical. If it is anything other than vertical the attribute aligns to zero and is not aligned correctly with the rest of the block.
Its difficult to describe. Ive attached an image to illustrate. On the vertical line, the attribute looks great. On the horizontal and diagonal lines, the attribute is not aligned to the block (circled in red). The desired alignment is shown in the blocks circled in green.
Is there a way to accomplish what Im trying to do in LISP? I would describe it as a dynamically controlled attribute alignment. Something would need to detect what the rotation is of the block and align the attribute accordingly. Below is copied the program Im using to insert the block and Ive attached the block as well.
(defun C:PE-CONTROLLER () (PE-CONTROLLER))
(defun PE-CONTROLLER ()
(GV)
(SETVAR 'CLAYER "PLUMBING-EQUIP")
(AutoRotateBlock "PE_CONTROLLER" nil 0)
(AlignAtts (ENTLAST) 0.0)
(SV)
)
Thank you
Solved! Go to Solution.