Jump to content

help ....modify dimension style from routine lsp


leonucadomi

Recommended Posts

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.

Link to comment
Share on other sites

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.

image.thumb.png.8de36e72c1ab7b8330279803df52179e.png

Edited by Dadgad
Alternate option
  • Agree 1
Link to comment
Share on other sites

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 by mhupp
Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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