sublimation Posted June 20, 2019 Posted June 20, 2019 I can't figure out why the setvar and getvar work when I preselect my entities but not when I select them individually. When I select the lines manually, my code extends the lines but with the original radius. ; EXTENDS 2 LINES TO COMMON POINT (defun C:ETP (/ xFillRad xArrEnt xCMD) (setq xCMD (getvar "CMDECHO")) (setvar "CMDECHO" 0) (setq xFillRad (getvar "FILLETRAD")) (setvar "FILLETRAD" 0.0) (IF (NOT (setq xArrEnt (SSGET "_I"))) (COMMAND "FILLET" "T" "T") (COMMAND "FILLET" "T" "T" (ssname xArrEnt 0) (ssname xArrEnt 1)) ) (setvar "FILLETRAD" xFillRad) (setvar "CMDECHO" xCMD) (princ) ) Quote
Roy_043 Posted June 21, 2019 Posted June 21, 2019 When the _Fillet comand prompts you to select entities, the code has completely finished, and therefore the variables have already been reset. Try changing: (COMMAND "FILLET" "T" "T") To: (COMMAND "FILLET" "T" "T" pause pause) You should also verify if the cmdecho should actually be ON for that part of the code. 1 Quote
sublimation Posted June 21, 2019 Author Posted June 21, 2019 Dude! That solved it and totally makes sense! Thank you very much! Quote
tombu Posted June 21, 2019 Posted June 21, 2019 With Shift key pressed while selecting the second segment with the FILLET command 0 radius will always be used no matter what FILLETRAD is set to. Easy peasy. 1 Quote
sublimation Posted June 21, 2019 Author Posted June 21, 2019 2 hours ago, tombu said: With Shift key pressed while selecting the second segment with the FILLET command 0 radius will always be used no matter what FILLETRAD is set to. Easy peasy. Handy tip! Thanks! 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.