Internal names for Appearance Library

Internal names for Appearance Library

floccipier
Advocate Advocate
666 Views
3 Replies
Message 1 of 4

Internal names for Appearance Library

floccipier
Advocate
Advocate

Hi guys, 

 

I am here again shamelessly with another question 😬
How can I find the internal code names for the appearance library items.  Specifically I read in another post that you can assign appearance like this 

Dim sourceAppearance As Asset = ThisApplication.AssetLibraries.Item("314DE259-5443-4621-BFBD-1730C6CC9AE9").AppearanceAssets.Item("InvGen-001-1-2") ' "Clear - Blue"
			targetAppearance = sourceAppearance.CopyTo(partDoc)

 and I want to use this method for some of my routines but don't know how to find internal names as used above. 

 

Thank you in advance. 

 

regards, 

sam

0 Likes
Accepted solutions (2)
667 Views
3 Replies
Replies (3)
Message 2 of 4

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

Write out all internal names for the libraries used in the current active project and all included appearance assets to iLogic protocol browser with

Dim oApp As Inventor.Application = ThisApplication

Dim oAssetLib As AssetLibrary
Dim oAsset As Asset
For Each oAssetLib In oApp.AssetLibraries
    Logger.Debug (oAssetLib.DisplayName)
    Logger.Debug (oAssetLib.InternalName)
    'enable to write out asset names
	'For Each oAsset In oAssetLib.AppearanceAssets
    '    Logger.Debug ("     " & oAsset.DisplayName)
    '    Logger.Debug ("     " & oAsset.Name)
    'Next
Next

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
Message 3 of 4

FINET_Laurent
Advisor
Advisor
Accepted solution

Hi,

 

You could also look trough the Object tree using the VBA editior.

Simply use this code in a new module, put an spy on "ThisApplication" Object and look inside like so :

 

Tutorial : https://www.youtube.com/watch?v=2ZnR8xBMBpg

 

Carpute5.JPG

 

Regards,

 

FINET L.

 

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

Message 4 of 4

floccipier
Advocate
Advocate

@FINET_Laurent  Thank you. 
@Ralf_Krieg  thanks again 🙂