Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help with "too few arguments" message

Status
Not open for further replies.

vbcad

Technical User
Jul 12, 2002
159
US
below is some code for doing a multiple purge on a drawing this is part of a bigger routine that does multiple things. i have looked at this several times and i just cannot find the problem. also in the code do i need to replace the word "blocks" with "insert" please help.

(defun c:MyPurge (Doc / );;;tried this both ways, as (defun c:MyPurge (Doc / ) and (defun MyPurge (Doc / )
(if (not Doc)
(setq Doc (vla-get-ActiveDocument (vlax-get-Acad-Object)))
)
(repeat 2
(foreach i '("Blocks" "DimStyles" "Linetypes" "Layers" "TextStyles")
(vlax-for Obj (vlax-get Doc i)
(vl-catch-all-apply 'vla-Delete (list Obj))
)
)
)
(princ)
)
 
Are you calling the "mypurge" defun with an argument, such as (c:mypurge "documentname")?
 
this is the entire section of code that is supposed to do the purging. the document would be the current open drawing. I am unsure of how to fix the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top