leonucadomi Posted August 5, 2021 Share Posted August 5, 2021 hello people: I want to control the size of the current dimension style from routine lsp there is some variable that controls? example.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 6, 2021 Share Posted August 6, 2021 The dim style is held in a table, and there is a lot of variables involved in a dim so 1st step is finding which one. Which using VL is quick ScaleFactor = 4.0 You could look at Dimoverride command may do what you want. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 6, 2021 Share Posted August 6, 2021 (edited) That is the Variable Value for the DIMSCALE variable, as shown in the SYSVDLG screenshot. I don't know how to do it with lisp, I would use the Action Recorder for that. Another way to do it would be to include it in your default Template as the Current DimStyle, then you hit the ground running. Edited August 6, 2021 by Dadgad Alternate option 1 Quote Link to comment Share on other sites More sharing options...
mhupp Posted August 6, 2021 Share Posted August 6, 2021 (edited) This will update the dimscale. so any dimension created after will have the new value. optional code to save that new value to a named dimstyle and to update existing dimensions. (defun c:foo (/ style SS) ;(setq style "Standard") ;(vl-cmdf "-Dimstyle" "Restore" style) (if (setq x (getreal (strcat "\nSet new Dimscale <" (rtos (getvar 'DIMSCALE)2)">: "))) (setvar 'DIMSCALE x) ) ;(vl-cmdf "-Dimstyle" "Save" style "Y") ;updates existing dimensions ;(setq ss (ssget)) ;(vl-cmdf "-Dimstyle" "Apply" SS "") ;update selected dimensions (princ) ) Edited August 6, 2021 by mhupp Quote Link to comment Share on other sites More sharing options...
leonucadomi Posted August 9, 2021 Author Share Posted August 9, 2021 thanks is good 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.