Author Topic: command-line entry vs autolisp passed to command line entry  (Read 2117 times)

0 Members and 1 Guest are viewing this topic.

mbrandt5

  • Newt
  • Posts: 44
command-line entry vs autolisp passed to command line entry
« on: November 20, 2017, 06:31:47 PM »
Has anyone experienced something different from command line entries, to autolisp passed entries...

For some reason if I have visual lisp editor pass the values (vl-cmdf "_.Mline") (vl-cmdf pt1) (vl-cmdf pt2) (vl-cmdf pt3) (vl-cmdf "_C") to autocad  The closed point moves sporadically

If I have visual lisp editor pass the following values then pause for user input (vl-cmdf "_.Mline") (vl-cmdf pt1) (vl-cmdf pt2) (vl-cmdf pt3 pause), followed by entering _C manually The mline closes correctly

I have only experienced this with mline...is there some setting to only close via user input I am unaware of...

Thanks for any input


Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: command-line entry vs autolisp passed to command line entry
« Reply #1 on: November 21, 2017, 08:09:27 AM »
Active Object Snap modes can affect coordinates supplied to an AutoCAD command through AutoLISP. I would suggest either prefixing the point input with the Object Snap "_non" (None) modifier to force AutoCAD to ignore Object Snap on the next point input, or temporarily disable all Object Snap modes prior to evaluating the AutoCAD command.

e.g.:
Code - Auto/Visual Lisp: [Select]
  1. (vl-cmdf "_.mline" "_non" pt1 "_non" pt2 "_non" pt3 "_C")

Stefan

  • Bull Frog
  • Posts: 319
  • The most I miss IRL is the Undo button
Re: command-line entry vs autolisp passed to command line entry
« Reply #2 on: November 21, 2017, 11:52:49 AM »
I've seen a lot of posts related to OSNAP and COMMAND issue.
If you set OSNAPCOORD sysvar to 1, the problem is solved. Just set it once with every new autocad installation and forget about it.

mbrandt5

  • Newt
  • Posts: 44
Re: command-line entry vs autolisp passed to command line entry
« Reply #3 on: November 23, 2017, 08:05:39 AM »
Thanks