I have a Global form from where I can change surface color. Everything is working ok to moment when I want to use that forms with old templates.
I see that when I set-up one of my Appearance style as default my rule is working properly with old files as well.
That's why I need code with set-up as a default one of defined appearance library. This will solve my issue.
My code is like this and picture of the form you can find below:
Dim oDoc As Document
oDoc = ThisApplication.ActiveDocument
Try
If Parameter("Customized_Color") = False
oDoc.AppearanceSourceType = AppearanceSourceTypeEnum.kMaterialAppearance
Else If Parameter("Customized_Color") = True
iProperties.PartColor = Parameter("Surface_Color")
End If
Catch
MessageBox.Show("Surface color not changed !!! Change default appearance library to RAL_Appearance and update document", "Apperiance rule ERROR")
End Try