Jump to content
sublimation

Issues with Storing/Retrieving FILLETRAD

Recommended Posts

sublimation

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)
	)

 

Share this post


Link to post
Share on other sites
Roy_043

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.

  • Thanks 1

Share this post


Link to post
Share on other sites
sublimation

Dude!  That solved it and totally makes sense!  Thank you very much!

Share this post


Link to post
Share on other sites
tombu

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.

  • Like 1

Share this post


Link to post
Share on other sites
sublimation
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!

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...