Author Topic: Variable for rectangle radius and width?  (Read 1510 times)

0 Members and 1 Guest are viewing this topic.

tedg

  • Swamp Rat
  • Posts: 811
Variable for rectangle radius and width?
« on: November 07, 2016, 11:33:05 AM »
Hello fellas,
Is there a variable that sets the radius for rounding the corners of rectangles and the width?
Other than within the command line:
Code: [Select]
(command "_rectangle" "f" rad1 "w" wid1 pt1 pt2)

Filletrad and Plinewid doesn't seem to apply here.


Like I want to re-set  these back after running a routine but I don't know what drives these other than within the rectangle command.
If I don't, the next rectangle will have the corners fillets equal to "rad1" and width equal to "wid1".
Any suggestions?


Sorry if this is a simple "D'oh" answer, but I couldn't find it.
Thanks
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Variable for rectangle radius and width?
« Reply #1 on: November 07, 2016, 11:50:26 AM »
I just turned on the SYSVARMONITOR & added them all .. nothing was triggered when I made the changes in the rectangle command.

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

tedg

  • Swamp Rat
  • Posts: 811
Re: Variable for rectangle radius and width?
« Reply #2 on: November 07, 2016, 12:55:49 PM »
I just turned on the SYSVARMONITOR & added them all .. nothing was triggered when I made the changes in the rectangle command.
Yes, same here, it told me about some other ones like "last point" but nothing about the rectangle....
 :?


So I wonder how to reset that, because it does remember those settings after?
Seems to remember the last rectangle settings but are not system variables?
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

ronjonp

  • Needs a day job
  • Posts: 7529
Re: Variable for rectangle radius and width?
« Reply #3 on: November 07, 2016, 01:05:31 PM »
Maybe just call this after you're done since the defaults are 0.
(command "_rectangle" "f" 0 "w" 0 nil)

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

tedg

  • Swamp Rat
  • Posts: 811
Re: Variable for rectangle radius and width?
« Reply #4 on: November 07, 2016, 01:15:50 PM »
Maybe just call this after you're done since the defaults are 0.
(command "_rectangle" "f" 0 "w" 0 nil)
Thanks Ron, that worked.
Code: [Select]

    )
     (progn
(setvar "plinegen" 0)
        (command "_rectangle" "f" rad1 "w" wid1 pt1 pt2)
(command "_rectangle" "f" 0 "w" 0 nil "")
         )
  )
Windows 10 Pro 64bit, AutoCAD 2023, REVIT 2023

Lee Mac

  • Seagull
  • Posts: 12915
  • London, England
Re: Variable for rectangle radius and width?
« Reply #5 on: November 07, 2016, 01:21:03 PM »
Given that the default values are not stored globally, you could check values of all symbols returned by atoms-family before & after evaluating the RECTANG command to see if the command uses a global variable.