mcoonrod
2005-10-21, 06:50 PM
Is it possible?
I have been trying to pass the name of a selection set as a argument ie...
(addblock "BLOCKNAME" "MYBLOCK1")
(defun addblock (blkname selset)
(setq tempss (ssget "X" (list (cons 2 blkname))))
(setq num 0)
(if (= tempss nil)
(progn
(princ)
)
(progn
(setq ssle (sslength tempss))
(repeat ssle
(setq ent1 (ssname tempss num))
(ssadd ent1 selset)
;;;;;;CRASHES HERE
(setq num (+ num 1))
)
)
)
)[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]
It crashes when I go to add a block to it.
Any help would be appreciated because I am new to this.
I have been trying to pass the name of a selection set as a argument ie...
(addblock "BLOCKNAME" "MYBLOCK1")
(defun addblock (blkname selset)
(setq tempss (ssget "X" (list (cons 2 blkname))))
(setq num 0)
(if (= tempss nil)
(progn
(princ)
)
(progn
(setq ssle (sslength tempss))
(repeat ssle
(setq ent1 (ssname tempss num))
(ssadd ent1 selset)
;;;;;;CRASHES HERE
(setq num (+ num 1))
)
)
)
)[ Moderator Action = ON ] What are [ CODE ] tags... (http://forums.augi.com/misc.php?do=bbcode#code) [ Moderator Action = OFF ]
It crashes when I go to add a block to it.
Any help would be appreciated because I am new to this.