Hello,
I'm looking for a routine that I can choose to scale by 25.4 (Imperial to Metric) or .039370079 (Metric to Imperial).
We just got a CNC Machine that works with metric and people keep asking me to make changes in bothe formats.
I'm using CAD 2014.
Any help is greatly appriciated
thanks
Solved! Go to Solution.
Solved by Kent1Cooper. Go to Solution.
@Migumby wrote:
....
I'm looking for a routine that I can choose to scale by 25.4 (Imperial to Metric) or .039370079 (Metric to Imperial).
....
Assuming you only care about model-space content, try these [untested and very basic]:
(defun IMS (sf); = Imperial vs. Metric Switch sub-routine [sf is scale-factor argument]
(command
"_.model"
"_.scale" "_all" "" "0,0" sf
)
)
(defun C:I2M (); = Imperial to Metric
(IMS 25.4)
)
(defun C:M2I (); = Metric to Imperial
(IMS (/ 1 25.4))
)
They assume that 0,0 is an appropriate base point for Scaling things around. They could be made to use the middle of the drawing extents, if that seems more appropriate, or other possibilities. They could also be made to do things like unlock and thaw and turn on all Layers, make sure you're in the World Coordinate System, and other sophistications.