Hi all,
for a while now i've been trying to find the best way to persist routine variables within and across sessions of AutoCAD. I finally settled on inheriting from 'Configuration.ApplicationSettingsBase' and saving the variables at the end of the routine, which has been working fine. However, i'm currently writing a routine that creates a few custom object snaps and have 2 different interfaces to the 'COSMODE' property:
1. is the command line routine
2. is a new tab placed in the Drafting Settings Dialog
the problem is that the property set using the command line is different to the one set using the dialog, although (and this is probably the wrong assumption on my part) they use the same property to set and get the value.
i thought that perhaps one version of the routine was being executed from the document context and one from the application context, but after adding the 'CommandFlags.Session' attribute i still get different values
is there a better way to persist routine variables (registry?, xml?) or a way to solve this problem???
any help would be great
Cheers, Mark
PS. i've attached my working solution to try and demonstrate this