I agree. You need to learn the interface, menu's, navigation, how to set up units and snapping, keyboard shortcuts (because everything in Blender is accessed by keyboard commands), modifiers, etc. Blender is a fantastic program, but it does have a learning curve. Starting with the absolute basics is very important.
You may have to loop through the selection set using a if with ands.
Not tested very much
(setq ALLENTS (ssadd))
(repeat (setq x (sslength ss1))
(setq ent (ssname ss1 (setq x (1- x))))
(setq entgt (entget ent))
(setq str (cdr (assoc 0 entgt)))
(setq lay (cdr (assoc 8 entgt)))
(if
(and
(or (= str "TEXT")(= str "MTEXT"))
(or (= lay "TEXT_STAGE NUMBER_LISP")(= lay "TEXT_LOT NUMBER_LISP")(wcmatch "POLY" "*POLY*"))
)
(setq allents (ssadd ent allents))
)
)
Just a couple of comments, when you select the white line for offset which end is start ? So the end lines may get drawn on the wrong end. I use a check distance from end points to pick point and then can see whether to join start or ends of new offset.
I use this for -ve (- of) note space between - and of.
An example of check end. once you know start or end then offset matches.
(defun doline ( / d1 d2)
(setq pt1 (vlax-get Obj 'StartPoint))
(setq pt2 (vlax-get Obj 'EndPoint))
(setq d1 (distance pt1 pt3)
d2 (distance pt2 pt3)
)
(if (< d1 d2)
(progn
(setq temp pt1)
(setq pt1 pt2)
(setq pt2 temp)
)
)
(princ)
)
(setq ent (entsel "\npick p/line near end "))
(setq pt3 (cadr ent))
(setq obj (vlax-ename->vla-object (car ent)))
(doline )
@pkenewellThank You for the code really appreciate that. I am exactly looking for something like this. I wanted to have the layers (TEXT,DIMENSIONS,TITLE,TITLE BLOCK) on in my drawing and rest of the layers off. I wanted to do that by typing a command and not by selecting the objects with the mouse.
Technically, the rotation of the block is associated with the block itself and not the Dynamic Property called Angle. We assume that every block is inserted at 0-degree rotation initially and then the dynamic property called Angle manipulated the orientation of the block itself with regards to its initial rotation or current rotation.
It is not recommended to have duplicate properties, one inherent to the block and another as a dynamic block property. It's not helpful.
The Rotation is group code 50 of the entity itself while the dyn prop can be recovered using Lee-Mac's dynpropvalue functions in AutoLISP. You don't usually constrain the local inherent rotation (Angle) of the block to that of the WCS.