Started by nelsonN ·
2011-08-14 11:15 UTC ·
6 replies · SMF topic #1672
nelsonN
2011-08-14 11:15 UTC
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.
fred_tomke
2011-08-14 15:19 UTC
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
owenwengerd
2011-08-14 18:07 UTC
It sounds like you forgot to turn off object snap.
nelsonN
2011-08-14 18:53 UTC
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?
nelsonN
2011-08-14 19:06 UTC
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?
owenwengerd
2011-08-15 23:54 UTC
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.
nelsonN
2011-08-18 09:48 UTC
Ok, Thanks.