Glenn Pope
2004-07-06, 03:24 PM
Hey Guys,
I'm upgrading a routine that I wrote that allow you to assign different Layer, Ltscale, Dimscale, and Text Style to each layout. The routine uses a ini file to store default settings and xrecords to store the info for each layout in the drawing. One of the upgrades is the ability to turn off some of the options so that they don't change when switching layouts.
The Problem:
When turning off a setting and switching to another layout, the info (for that option) that is stored in the xrecords is overwritten with the settings of the layout switched to. I want it to retain that setting so if I turn the option back on and go back to that layout, it sets it back to what it was before turning off the option. :confused: yet?
Looks like whats happening:
There is a reactor that looks for these variables to change. The reactor fires a routine that will save the setting to the xrecord for the current layout. There is another reactor that fires when changing layouts. It fires a routine that will retrieve the info from the xrecord for the layout being switch to. In this routine, I disable the reactor that watches for changes in the variables. It appears that the reactor is not disabled and fires off the routine and then overwrites the info in the xrecords.
I hope this makes since. I will try to clarify if needed. I would appreciate any help.
Also if you see something that could be coded better, let me know.
I'm upgrading a routine that I wrote that allow you to assign different Layer, Ltscale, Dimscale, and Text Style to each layout. The routine uses a ini file to store default settings and xrecords to store the info for each layout in the drawing. One of the upgrades is the ability to turn off some of the options so that they don't change when switching layouts.
The Problem:
When turning off a setting and switching to another layout, the info (for that option) that is stored in the xrecords is overwritten with the settings of the layout switched to. I want it to retain that setting so if I turn the option back on and go back to that layout, it sets it back to what it was before turning off the option. :confused: yet?
Looks like whats happening:
There is a reactor that looks for these variables to change. The reactor fires a routine that will save the setting to the xrecord for the current layout. There is another reactor that fires when changing layouts. It fires a routine that will retrieve the info from the xrecord for the layout being switch to. In this routine, I disable the reactor that watches for changes in the variables. It appears that the reactor is not disabled and fires off the routine and then overwrites the info in the xrecords.
I hope this makes since. I will try to clarify if needed. I would appreciate any help.
Also if you see something that could be coded better, let me know.