jmcshane
2007-06-22, 04:09 PM
Hi,
I am looking for some direction or advice in how to select a certain LWPOLYLINE
which passes through point 0,0 within a block.
History:
Since day dot, our company has always had the outline of an A1 sheet on the the title block
and always plotted on A0 paper and trimmed to the outline afterwards....
Now that we are moving to A1 size rolls and removing the outline of the A1 sheet,
it has fallen on me to sort out how we are going to plot all the drawings that have been done up until now, on A1 paper.
I have done a search through this forum, and found a snippet by RKMcSwain
containg the following :
(setq sset (ssget "_X" '((0 . "INSERT"))) i 0)
(repeat (sslength sset)
(setq ent (ssname sset i))
(setq obj (entget ent))
(princ "\nBlock Name: ")
(princ (cdr (assoc 2 obj)))
(setq a (tblobjname "BLOCK" (cdr (assoc 2 obj))))
(while (setq a (entnext a))
(setq ea (entget a))
(princ "\n--->Sub-Entity: ")
(princ (cdr (assoc 0 ea)))
(princ " (Handle=")
(princ (cdr (assoc 5 ea)))
(princ ") ")
)
; loop counter
(setq i (1+ i))
)
I just don't know how to find the subentity of the block which is a polyline that passes through 0,0 and delete it.
Any hints, thoughts or advice would be most welcome.
John
I am looking for some direction or advice in how to select a certain LWPOLYLINE
which passes through point 0,0 within a block.
History:
Since day dot, our company has always had the outline of an A1 sheet on the the title block
and always plotted on A0 paper and trimmed to the outline afterwards....
Now that we are moving to A1 size rolls and removing the outline of the A1 sheet,
it has fallen on me to sort out how we are going to plot all the drawings that have been done up until now, on A1 paper.
I have done a search through this forum, and found a snippet by RKMcSwain
containg the following :
(setq sset (ssget "_X" '((0 . "INSERT"))) i 0)
(repeat (sslength sset)
(setq ent (ssname sset i))
(setq obj (entget ent))
(princ "\nBlock Name: ")
(princ (cdr (assoc 2 obj)))
(setq a (tblobjname "BLOCK" (cdr (assoc 2 obj))))
(while (setq a (entnext a))
(setq ea (entget a))
(princ "\n--->Sub-Entity: ")
(princ (cdr (assoc 0 ea)))
(princ " (Handle=")
(princ (cdr (assoc 5 ea)))
(princ ") ")
)
; loop counter
(setq i (1+ i))
)
I just don't know how to find the subentity of the block which is a polyline that passes through 0,0 and delete it.
Any hints, thoughts or advice would be most welcome.
John