OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Hypersonic on January 18, 2010, 02:00:24 PM

Title: calender upgrade not working, not sure what's wrong....
Post by: Hypersonic on January 18, 2010, 02:00:24 PM


(dcl_Calendar_SetCurSel job_manager_job_manager_cal1_Calendar1 (list (atoi min_year) (atoi min_month) (atoi min_day)))

This returns an error that says "Bad arguement, expected more arguements"

Not sure why, this is an upgrade from object_dcl to open_dcl, but I copied in the "new" version of the setcursel command (shown above) and it still does it.... ugh

Thanks!
Title: Re: calender upgrade not working, not sure what's wrong....
Post by: Kerry on January 19, 2010, 07:08:02 AM

How about posting a small sample .LSP and .ODCL demonstrating your difficulty.

This will save Owen some time and ALSO make sure that your usage of the Control and methods is correct.
Title: Re: calender upgrade not working, not sure what's wrong....
Post by: owenwengerd on January 19, 2010, 09:05:00 AM
The problem is that AutoCAD chokes on a 3-integer list whose first element is the integer 2010. This is a long-standing problem in AutoCAD resulting from its attempt to interpret such a list as a DXF group. The only solution is to fool AutoCAD by making the first element a real instead of an integer.  Use (float (atoi min_year)) to make it a real, then it should work.
Title: Re: calender upgrade not working, not sure what's wrong....
Post by: Hypersonic on January 20, 2010, 05:53:18 AM
Yep the float thing fixed it!  Wow, I would have never figured that out!
Thanks Owen!