Jump to content

Manage multiple custom scale lists


halam

Recommended Posts

Hi,

 

How do you manage your default scales (annotative)? In my work i have to be able to work with both mm. and m. It seems not possible to use the default options, because this is fixed and i cannot see how this can be made dependent on the right drawingunits to be applied.

 

 

So i made a few lines of code with to do it. But it is kind of slow now. I noticed that LM:steal the ability has do get scales over but i would like to have a special command.

Suggestions and your ideas about his are welcome

 

 


(defun c:SetScale (/)
 (setq getunits (getvar "insunits"))
(if (= getunits 4) (c:setscale_mm) ()) 
(if (= getunits 6) (c:setscale_m) ())
 )


(defun c:SetScale_mm (/ lst pat tmp)
;;; Pat - the pattern scale is made up of lists of species 
;;; (("Name of the Scale 1" Scale_paper_unit_1 Scale_drawing_unit_1) 
;;; ("Name of the Scale 2"  Scale_paper_unit_2 Scale_drawing_unit_2) 
;;; ... 
;;; ...
;;; Usage: (SetScale)
 (setq pat '(("NLCS_MM_1:1" 1 1)  ;_Correct scale here
             ("NLCS_MM_1:2" 1 2)
      ("NLCS_MM_1:5" 1 5)
             ("NLCS_MM_1:10" 1 10)
      ("NLCS_MM_1:20" 1 20)
             ("NLCS_MM_1:50" 1 50)
             ("NLCS_MM_1:100" 1 100)
      ("NLCS_MM_1:200" 1 200)
      ("NLCS_MM_1:250" 1 250)
      ("NLCS_MM_1:500" 1 500)
      ("NLCS_MM_1:1000" 1 1000)
      ("NLCS_MM_1:2000" 1 2000)
      ("NLCS_MM_1:2500" 1 2500)
      ("NLCS_MM_1:5000" 1 5000)
      ("NLCS_MM_1:10000" 1 10000)
            )
) 

 (setq tmp (mapcar 'car pat))
(setq getexpert (getvar "expert"))
(setvar "expert" 5)  
(command "_.-scalelistedit" "RESET" "YES" "EXIT")
(command "_.-scalelistedit" "d" "*" "EXIT")
       (progn
         (while (> (getvar "CMDACTIVE") 0) (command))
         (command "_.-scalelistedit")
         (foreach item pat
           (command "_Add"
                    (car item)
                    (strcat (rtos (cadr item)) ":" (rtos (caddr item)))
           ) ;_ end of command
         ) ;_ end of foreach
         (command "_Exit")
         (while (> (getvar "CMDACTIVE") 0) (command))
  
       ) 
 (setvar "expert" getexpert)
 (princ)
)

for meter.jpg

for millimeter.jpg

default.jpg

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