01-19-2012 08:30 AM
Hi John
Use the following Methods
SequenceFile.GetSequence ( index) to return a reference to the Sequence
or use
SequenceFile.GetSequenceByName ( sequenceNameParam) or by a name
ie
SequenceFile.GetSequenceByName ( "MainSequence")
then once you have your Sequence reference then you can get a PropertyObject reference to Locals.
Sequence.Locals as a PropertyObject
eg
Sequence seq = seq_file.GetSequence ( index = 0) (usually for the MainSequence)
but better to use
Sequence seq = GetSequenceByName ( "MainSequence")
then to get you value from your local
PropertyObject str = seq.Locals.GetValString("strTextBox", 0);
Because you have a reference to Locals for the required sequence you dont use "Locals" in the Lookup String.
You only need the full Lookup string if you have the Sequence Context.
Hope this helps
01-19-2012 08:54 AM
Thanks a lot! It works!
01-19-2012 09:11 AM
One more thing. When i change local variable i see the change in the code but sequence stays unchanged.
Engine my_egine = axApplicationMgr.GetEngine();
SequenceFile seq_file = my_egine.GetSequenceFileEx(seq_file_path, TypeConflictHandlerTypes.ConflictHandler_UseGlobalType);
Sequence seq = seq_file.GetSequenceByName("MainSequence");
seq.Locals.SetValString("strTextBox", 0, "my new string");
string str = seq.Locals.GetValString("strTextBox", 0);
MessageBox.Show(str);
I see "my new string" in message box but in the sequense the text is "Hello World".
01-23-2012 02:26 AM