In most of my routines I call a function to draw to the active scale. This is now very basic:
(defun b=sch (/ sch)
(if (eq (getvar "DIMSCALE") 0)
(setq sch 1.0)
(setq sch (getvar "DIMSCALE"))
)
)
When I've switched tabs I must make the right dimstyle active to let routines react as I want them to. There are several ways to improve this:
[1]Always use a scale of 1 when you are in Paperspace
[2]Make a reactor that makes the last used dimstyle active in modelspace or paperspace.
[3] ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, for each tab.
Option 1 only works with a layout scale of 1. This works for our drawing standards, but not for all drawings we get from our clients.
Option 2 Is what I can do: make 2 reactors. When you switch dimstyle then store the dimstyle+space in a dictionary, and when you switch tabs restore the dimstyle that is stored in the dictionary.
Option 3 This is the best option, because it's possible to use different scales and dimstyles for each layout. This has to be done like option 2, but I think in this case you should use XDATA that is attached to the layout tab, because layouts can be renamed/deleted.
My problem is that I don't know how to read/write xdata to a tab. Is this possible? Is so how
Or do you have a different solution that I didn't think of?