OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: nelsonN on August 14, 2011, 04:15:50 AM

Title: Problem with drawing pline
Post by: nelsonN on August 14, 2011, 04:15:50 AM
I write a little program which draw square with polyline command. For it I create dialog with opendcl when may write a four side of square. My problem in that if i write a integer digit in my dialog - all ok, but if I write real digit (especially for side "b") - begin a problem. Side b SOMETIMES equal "0"  For example after dialog load with current side value 10 10 10 10 - ok, but after it  if I write side b value 0.15 - side b = 0(on drawing). If after it I encrease my drawing (zoom realtime ) and again click "BANZAI" - side b = 0.15. In all case before clicking, on command "!b" atocad show "0.15". I want that it worked just using Polar command. Thanks.   
Title: Re: Problem with drawing pline
Post by: Fred Tomke on August 14, 2011, 08:19:18 AM
Hi, nelsonN, welcome to the board. It seems that the LSP-file is not finished yet: it includes only one event function.

BTW, I recommend you to set the textbox filterstyle to units filterstyle.

Regards,
Fred
Title: Re: Problem with drawing pline
Post by: owenwengerd on August 14, 2011, 11:07:28 AM
It sounds like you forgot to turn off object snap.
Title: Re: Problem with drawing pline
Post by: nelsonN on August 14, 2011, 11:53:47 AM
Thanks for you answer, Fred

It's intresting that I write this program in usual lsp file (without use opendcl) and problem repeated again. If I use (on var "b" for example) integer digit - it work, but just I use real digit 0.15 - this problem have place again. With increase drawing using zoom realtime - all good, but second start the  line1 command finished with same  mistake. Anybody may help me on this banal situation?     

Title: Re: Problem with drawing pline
Post by: nelsonN on August 14, 2011, 12:06:40 PM
Thank's owenwengerd

Turning off object snap helped. Now as I understand me need turn of "object snap"  in lisp-code before start  pline command? Or have other path for solving this problem?
Title: Re: Problem with drawing pline
Post by: owenwengerd on August 15, 2011, 04:54:17 PM
It should work fine as long as you turn off object snap, but better would be to not use commands at all and just create the polylines directly.
Title: Re: Problem with drawing pline
Post by: nelsonN on August 18, 2011, 02:48:08 AM
Ok, Thanks.