rog1n Posted June 16, 2019 Posted June 16, 2019 Hi, I am trying to offset the entlast with option Through displaying the preview of the new polyline like the gift below, but I failed to display the new polyline, I tried command like: (command "_.offset" "_E" "_N" "_T" (entlast) pause) The command work without the preview, anyone can help me with this issue? Quote
dlanorh Posted June 16, 2019 Posted June 16, 2019 (edited) What happens if you change it to (command "_offset" "_E" "_N" "_T" (entlast) pause)? Edited June 16, 2019 by dlanorh Quote
rog1n Posted June 17, 2019 Author Posted June 17, 2019 Happens the same, no display the preview of new line Quote
dlanorh Posted June 17, 2019 Posted June 17, 2019 That is probably because the command via lisp cannot trigger the preview. Someone may have an idea on how to emulate it, but it is not available via lisp. Quote
Roy_043 Posted June 18, 2019 Posted June 18, 2019 Perhaps use vla-sendcommand?: (defun c:test () (if (setq *entselLst* (entsel)) (vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_.offset _erase _no _through !*entselLst* " ) ) (princ) ) 2 Quote
BIGAL Posted June 19, 2019 Posted June 19, 2019 Roy tried with ( entsel) rather than !*entselst* worked in Briscad. Note though no error check then. 1 Quote
rog1n Posted July 5, 2019 Author Posted July 5, 2019 Hello again, one more question how I finish the command after (vla-get-activedocument (vlax-get-acad-object)) "_.offset _erase _no _through !*entselLst* " ) Quote
rog1n Posted September 23, 2019 Author Posted September 23, 2019 Hello, As I said in first I trying draw a polyline and after do a offset with through option. After help of Roy_043 I do this: (defun c:test() (vl-load-com) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (setq p1 (getpoint "\First point...")) (setq p2 (getpoint p1 "\nSecond point...")) (command "_pline" p1 p2) (while (setq p2 (getpoint "\nNext point...(Enter to finish)...." p2)) (command p2) ) (command) (vla-sendcommand obj "_.offset _erase _no _through (entlast) ") ) But after I click to make a new polyline the lisp continues asking to select object to offset (I need the lisp finish here) and if I press ESC to cancel the command and hit ENTER to do the same command again the last command is the "offset" instead of test. I think I am doing this the worst way. If anyone can help me I will apreciatte so much Quote
Roy_043 Posted September 24, 2019 Posted September 24, 2019 (edited) What you are seeing is a logical consequence of using vla-sendcommand. The command string is processed after the Lisp function has finished. If you really need the preview then maybe a toolbar macro is an option? Edited September 24, 2019 by Roy_043 1 Quote
rog1n Posted September 24, 2019 Author Posted September 24, 2019 4 hours ago, Roy_043 said: What you are seeing is a logical consequence of using vla-sendcommand. The command string is processed after the Lisp function has finished. If you really need the preview then maybe a toolbar macro is an option? I search about toolbar macro, if understood correct I will always need to click on button at toolbar that slowing down the process Quote
Roy_043 Posted September 24, 2019 Posted September 24, 2019 You can create a keyboard shortcut for the macro. 1 Quote
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.