MarcoW Posted September 29, 2009 Share Posted September 29, 2009 Hi to all, I read some interesting stuff about the vlax-curve-getClosestPointTo and I might find it useful for inserting blocks on lines etc. In my case I put 90% of the blocks (electrical symbols) on walls that are made of lines / plines / whatever an architect comes up with .. . (Note: these architect drawings are loaded as an xref under the actual drawing). Now I allways use (via macro's): *^C^C-insert;w1;s;$m=$(getvar,userr1) Where w1 is the block name and the rest is used to get the correct scale size of the symbol. Because my osnaps automatically turns to "nearest" I manage to place them right on the line. But I remember I once had an application that allowed me to left-click somewhere in front of the line and it would then insert the block on the nearest point. How would that be done? For vlax-curve-getClosestPointTo seems only to work on curves, so not plines etc. This is one of the useful places where I got my info so far: http://www.asmitools.com/Files/AutoLISP_Help/Functions/vlax-curve-getClosestPointTo.html Quote Link to comment Share on other sites More sharing options...
lpseifert Posted September 29, 2009 Share Posted September 29, 2009 At the 'Specify insertion point' type nea (or select the "Nearest" icon from the Object snap toolbar... or Shift+right click to bring up the shortcut menu). BTW... vlax-curve-getClosestPointTo works on plines, lines, circles, arcs... as long as they are VLA-objects Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 29, 2009 Share Posted September 29, 2009 At the 'Specify insertion point' type nea (or select the "Nearest" icon from the Object snap toolbar... or Shift+right click to bring up the shortcut menu).BTW... vlax-curve-getClosestPointTo works on plines, lines, circles, arcs... as long as they are VLA-objects I know it says that in the AutoLisp help, but they don't have to be VLA-OBJECTS. This works just fine: (setq ent (entsel)) (setq pnt (vlax-curve-getclosestpointto (car ent) (cadr ent))) I thought that too for a long time, until I forgot to convert and noticed it still worked. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 29, 2009 Share Posted September 29, 2009 The Curve functions are also much much much faster using Entities rather than VLA-objects... see here: http://www.theswamp.org/index.php?topic=30434.msg360572#msg360572 Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 29, 2009 Share Posted September 29, 2009 The Curve functions are also much much much faster using Entities rather than VLA-objects... see here: http://www.theswamp.org/index.php?topic=30434.msg360572#msg360572 LoL [COUGH]shamelessselfpromotion[/COUGH] :lol: Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted September 29, 2009 Share Posted September 29, 2009 LoL[COUGH]shamelessselfpromotion[/COUGH] :lol: The thought hadn't even crossed my mind Quote Link to comment Share on other sites More sharing options...
alanjt Posted September 29, 2009 Share Posted September 29, 2009 The thought hadn't even crossed my mind LoL Ah hah! We need a smiley that's waving its finger. Quote Link to comment Share on other sites More sharing options...
MarcoW Posted September 30, 2009 Author Share Posted September 30, 2009 That I have: But Lee don't bother, I am there too Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.