Jump to content

Too many arguments error


LosGirk

Recommended Posts

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?

 

(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.

Link to comment
Share on other sites

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:

 

(setq pt1 (getpoint))
(setq pt2 (getpoint))
(setq pt3 (getpoint))
(setq toggle1$ "1")
(setq toggle2$ "1")

(if [color="red"](= toggle1$ toggle2$ "1")[/color]
 (vl-cmdf "dimhorizontal" pt1 pt2 pt3)
)

 

 

 

Cheers

Link to comment
Share on other sites

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

 

No worries; glad you got it sorted. :thumbsup:

 

Cheers

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...