I am having trouble having this program autoselect the line that was nearest to the insertionpoint selected by user.If anyone could help I would greatly appreciate it
|
I am having trouble having this program autoselect the line that was nearest to the insertionpoint selected by user.If anyone could help I would greatly appreciate it
Just check the structure of your program ... i.e. where the open and closing parentheses are. I find it easiest to use VLIDE's autoformat to indent the Lisp according to where parentheses are placed - no need for counting. The LSP file doesn't seem to be indented correctly, so it's difficult to understand what you wanted to do. Attached is the version after formatting in VLIDE.
E.g. these 2 lines are simply executing one after the other as lines inside a progn. I think they are meant as the 1st should be a check in an if and the 2nd should be the then clause. Though the effect makes no difference - the 1st could simply be omitted.Code:(eq 16384 (logand 16384 (getvar "osmode"))) (setvar "OSMODE" (boole 6 (getvar "osmode") 16384))
Indeed, and it has been.
Thanks for the response irneb, I know you know your stuff
But we were successful in having this program operate, in fact I'll attach the current version in case you would like to give any comments
These are 1 lsp and it's dcl out of the 30 or so req'd for our needs, all of them are working nice and well though, but without any error trapping...
If you could perhaps point me in the right direction there as far as error trapping and testing user input (<--believe I am doing so on the only getpoint within the routines. Everything else autocad should take care of the error-trapping for I *believe* though confirmation would be excellent to have on this.
Thanks again irneb/others