Jump to content
LosGirk

Too many arguments error

Recommended Posts

LosGirk

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.

Share this post


Link to post
Share on other sites
BlackBox

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

Share this post


Link to post
Share on other sites
LosGirk

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

Share this post


Link to post
Share on other sites
BlackBox
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×