Problem with drawing pline

Started by nelsonN, August 14, 2011, 04:15:50 AM

Previous topic - Next topic

nelsonN

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

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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

It sounds like you forgot to turn off object snap.
Owen Wengerd (Outside The Box) / ManuSoft

nelsonN

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

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

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.
Owen Wengerd (Outside The Box) / ManuSoft