+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Full Member
    Using
    Civil 3D 2014
    Join Date
    Dec 2013
    Location
    Dallas, TX
    Posts
    79

    Unhappy Too many arguments error

    Registered forum members do not see this ad.

    I'm trying to create a dimension when two toggles are picked in unison. Can someone tell me why this gives me a "too many arguments" error please?

    Code:
    (if (and (= toggle1$ "1")( = toggle2$ "1"))(vl-cmdf "dimhorizontal" pt1 pt2 pt3))
    Both toggles equal 1 when I run my code.

    Thank you in advance for your time.

  2. #2
    Luminous Being BlackBox's Avatar
    Computer Details
    BlackBox's Computer Details
    Operating System:
    Windows 8.1 Professional, Server 2012 R2 Datacenter
    Computer:
    Dell Precision T3600
    CPU:
    Hex-Core Intel Xeon 3.2Ghz
    RAM:
    32GB
    Graphics:
    3GB NVIDIA Quadro K4000
    Primary Storage:
    2 x 240GB Samsung EVO SSD (RAID 0)
    Secondary Storage:
    1TB Western Digital VelociRaptor 10K RPM
    Monitor:
    Dual 24" Dell Ultrasharp Widescreen Monitors
    Discipline
    Civil
    BlackBox's Discipline Details
    Occupation
    Senior Civil Designer
    Discipline
    Civil
    Details
    Public/Private Land Development, Transportation, and Utilities.
    Using
    Civil 3D 2016
    Join Date
    Nov 2009
    Posts
    5,282

    Default

    How are you determining that this line of code is causing your error?

    I've just tried this, and all seems to work as expected:

    Code:
    (setq pt1 (getpoint))
    (setq pt2 (getpoint))
    (setq pt3 (getpoint))
    (setq toggle1$ "1")
    (setq toggle2$ "1")
    
    (if (= toggle1$ toggle2$ "1")
      (vl-cmdf "dimhorizontal" pt1 pt2 pt3)
    )


    Cheers
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Sincpac C3D ~ Exchange Apps ~ Autoloader ~ AutoCAD Security

  3. #3
    Full Member
    Using
    Civil 3D 2014
    Join Date
    Dec 2013
    Location
    Dallas, TX
    Posts
    79

    Default

    I apologize BlackBox, the problem was higher up in my code. Thanks for your time though.

  4. #4
    Luminous Being BlackBox's Avatar
    Computer Details
    BlackBox's Computer Details
    Operating System:
    Windows 8.1 Professional, Server 2012 R2 Datacenter
    Computer:
    Dell Precision T3600
    CPU:
    Hex-Core Intel Xeon 3.2Ghz
    RAM:
    32GB
    Graphics:
    3GB NVIDIA Quadro K4000
    Primary Storage:
    2 x 240GB Samsung EVO SSD (RAID 0)
    Secondary Storage:
    1TB Western Digital VelociRaptor 10K RPM
    Monitor:
    Dual 24" Dell Ultrasharp Widescreen Monitors
    Discipline
    Civil
    BlackBox's Discipline Details
    Occupation
    Senior Civil Designer
    Discipline
    Civil
    Details
    Public/Private Land Development, Transportation, and Utilities.
    Using
    Civil 3D 2016
    Join Date
    Nov 2009
    Posts
    5,282

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by LosGirk View Post
    I apologize BlackBox, the problem was higher up in my code. Thanks for your time though.
    No worries; glad you got it sorted.

    Cheers
    "Potential has a shelf life." - Margaret Atwood
    AutoCAD, and Civil 3D Certified Professional | Autodesk Authorized Developer
    Sincpac C3D ~ Exchange Apps ~ Autoloader ~ AutoCAD Security

Similar Threads

  1. Error: Too few arguments ?
    By Xelathrone in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 3rd Apr 2014, 05:13 am
  2. Error: too few arguments
    By arunr_18 in forum AutoLISP, Visual LISP & DCL
    Replies: 14
    Last Post: 20th Jul 2013, 09:49 pm
  3. ; error: too few arguments
    By satishrajdev in forum AutoLISP, Visual LISP & DCL
    Replies: 5
    Last Post: 7th Feb 2013, 12:22 pm
  4. Replies: 3
    Last Post: 13th Nov 2012, 02:43 pm
  5. too many arguments error on lsp anyone know why
    By chelsea1307 in forum AutoLISP, Visual LISP & DCL
    Replies: 7
    Last Post: 17th Jun 2009, 09:34 pm

Bookmarks

Posting Permissions

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