#1
|
||||
|
||||
Revisited: Change scale of a Sketch
Hi,
Last year I posted a question about rescaling a Sketch in Annotation. The answer was that it should be possible by using the Drafting command PART_DRW_SCALE. I made this Lisp macro: Code:
(in-package :jaaps_tools) (use-package :oli) (sd-defdialog 'rescale_sketch :dialog-title "Rescale Sketch" :variables '( (schets :selection (*sd-anno-sketch-seltype*) :Title "Sketch") (schaal :initial-value nil :value-type :number :title "Schaal") ) :local-functions '( (doit () (sd-execute-annotator-command :cmd "PART_DRW_SCALE schets schaal") ) ) :ok-action '(doit) ) Anyone have a clue what's wrong? Thanks! Regards, Jaap |
#2
|
|||
|
|||
Re: Revisited: Change scale of a Sketch
Hello Jaap,
you made two mistakes:
The corrected code (doit body) looks like this: Code:
(sd-execute-annotator-command :cmd (format nil "PART_DRW_SCALE '~A' ~A" (sd-am-inq-unique-name schets) schaal)) Markus |
#3
|
||||
|
||||
Re: Revisited: Change scale of a Sketch
Thanks! It works!!
This was a learnful experience for me. We never used ME10, so ME10 macros are a bit mysterious to me.... Regards, Jaap |
#4
|
||||
|
||||
Re: Revisited: Change scale of a Sketch
Hi,
I thought it'd be nice to post the working macro, so that others can use it, too. Here's the code: Code:
(in-package :jaaps_tools) (use-package :oli) (sd-defdialog 'rescale_sketch :dialog-title "Rescale Sketch" :variables '( (schets :selection (*sd-anno-sketch-seltype*) :Title "Sketch") (schaal :initial-value nil :value-type :number :title "Schaal") ) :local-functions '( (doit () (sd-execute-annotator-command :cmd (format nil "PART_DRW_SCALE '~A' ~A" (sd-am-inq-unique-name schets) schaal)) ) ) :ok-action '(doit) ) Jaap |
#5
|
|||
|
|||
Re: Revisited: Change scale of a Sketch
Hi,
I try the code provided by Jaap in V17, it works well on the scaling. But after the scaling, I am not able to put in additional dimension to the item/element in the sketch. The following error msg pop up "The selected element cannot be used to create a dimension of the current type [Single-Dimension]. Please select again." In order to put in dimension again, I need to change owner for all elements in the sketch to sheet. Anyone can help to improve this code? Regards, CF |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|