Getting information of an entity inside of a block

Jamie Myers

Usenet Archive
Joined
Jul 24, 2003
Messages
35
Reaction score
0
Here we go again..........

I'm using the following lisp to find an enitity from a point

;;;Written by Jamie Myers
;;;Searches for entities in a certain direction
;;;RoomTagIns = Insertion point of my roomtag - the base point for this routine ;;;XorY_Angle = Either pi -angle 0 ;;; (* pi 0.5) -angle 90 ;;; (* pi 2.0) -angle 180 ;;; (* pi 1.5) -angle 270 ;;;DistStep = The incriment for the search for the entity to be returned ;;;SS is the entity that is returned

(defun WallFind (RoomTagIns XorY_Angle DistStep / DIST PNT SSLISTPNTS) (setq Dist 0) ;Dist starts as 0 (setq SS nil) ;SS as nil just in case (while (= SS nil) ;If nothing is found, keep going (setq Dist (+ Dist DistStep)) ;Keep adding the incriments until something is found (setq pnt (polar RoomTagIns XorY_Angle Dist)) ;set pnt (setq SSListPnts (list RoomTagIns Pnt)) ; create a list for ssget (setq SS (ssget "f" SSListPnts)) ;searches for an entity and returns SS ;*****I want to add something here****** ) ; end while ) ;end defun

;;;(WallFind RoomTagIns 1.5708 0.25) ;use of this sub-routine ;;;RoomTagIns comes from a getpoint call ;;;1.5708 is the angle to look ;;;0.25 incriments on how often to look

Where all the aterisks are above, I want to add this line stating that if the entity that is found is a block *insert*, then return the entity, inside the block, and the information for it. This is as far as I got (if (= (cdr (assoc 0 (entget (ssname SS 0)))) "INSERT")

I want to take the entity, inside the block, and get it's starting and ending points.
 
Let me rephrase this after I've done some more research. How can I do a nentsel without having to pick the entity, but passing it to nentsel?
 
See my comments in the "transformation matrix" thread dated 7/31/03 at 8:14 am est
 

Latest threads

Back
Top