iLogic Apperance

iLogic Apperance

Lukasz.Dudkowski
Enthusiast Enthusiast
631 Views
4 Replies
Message 1 of 5

iLogic Apperance

Lukasz.Dudkowski
Enthusiast
Enthusiast

Hello,

 

Could you please help me to create line of iLogic code with set default Appearance library ?

 

BR,

Łukasz Dudkowski

0 Likes
Accepted solutions (1)
632 Views
4 Replies
Replies (4)
Message 2 of 5

blandb
Mentor
Mentor

What exactly are you trying to do?

Autodesk Certified Professional
0 Likes
Message 3 of 5

Lukasz.Dudkowski
Enthusiast
Enthusiast

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

 

 

0 Likes
Message 4 of 5

dutt.thakar
Collaborator
Collaborator
Accepted solution

@Lukasz.Dudkowski 

Are you looking for something like this? Add this in your catch block, and it will change the appearance library to "RAL_Appearance"

 

Dim oLib As AssetLibrary = ThisApplication.AssetLibraries.Item("RAL_Appearance")
ThisApplication.ActiveAppearanceLibrary = oLib

 If this is not what you are looking for please, try to explain in detail what you are trying to achieve.

 

Hope this will help you.

If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!


Regards,
Dutt Thakar
LinkedIn
0 Likes
Message 5 of 5

Lukasz.Dudkowski
Enthusiast
Enthusiast

Thank you. Works like intended 🙂

0 Likes