Results 1 to 4 of 4

Thread: Help fix a routine - Error: too few arguments

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Woo! Hoo! my 1st post
    Join Date
    Login to Give a bone

    Default Help fix a routine - Error: too few arguments

    Private Sub ToggleWireNum()
    Dim pi As Double: pi = 4 * Atn(1)
    Dim x As AcadEntity
    Dim lin As AcadLine
    Call WDForceStart
    On Error Resume Next
    For Each x In ThisDrawing.ModelSpace
        If TypeName(x) = "IAcadLine" Then
            Set lin = x
              If lin.Angle = pi Then
                ThisDrawing.SetVariable "USERS1", x.Handle
                WDCommand ("(setq return (c:ace_get_wnum (handent (getvar ""USERS1""))))" & vbCr)
                WDCommand ("(setvar ""USERS2"" (car return))" & vbCr)
                    If Len(ThisDrawing.GetVariable("USERS2")) > 0 Then
                        WDCommand ("(c:ace_toggle_inline (cadr return))" & vbCr)
                    End If
            End If
        End If
    Next x
    End Sub
    Public Sub WDCommand(Command As String)
    ' MsgBox ("WDCommand subroutine called.")
    ThisDrawing.SendCommand (Command)
    End Sub
    Public Sub WDForceStart()
    Call WDCommand("(if(not wd_load)(if(setq x(findfile ""wd_load.lsp""))(load x)))(wd_load)" & vbCr)
    End Sub
    Last edited by Ed Jobe; 2020-04-27 at 02:24 PM. Reason: added <CODE> tags

Similar Threads

  1. Error: too few arguments in a function
    By twitchyChuck in forum AutoLISP
    Replies: 6
    Last Post: 2013-06-07, 09:24 PM
  2. Replies: 7
    Last Post: 2012-12-11, 01:41 PM
  3. Too few arguments, can someone check please?
    By mrsusan in forum AutoLISP
    Replies: 18
    Last Post: 2011-10-21, 12:00 PM
  4. Help fix a routine - Error: too few arguments
    By cadd4la in forum AutoLISP
    Replies: 3
    Last Post: 2006-01-10, 06:06 PM
  5. too few arguments on compile
    By voigtmark in forum AutoLISP
    Replies: 3
    Last Post: 2005-10-28, 06:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts