Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I tried to translate the API sample to .net (c#). Code snippet:
Inventor.AssetLibraries libraries; libraries = oApp.AssetLibraries; foreach (Inventor.AssetLibrary assetLib in libraries) { output.Add("Library " + assetLib.DisplayName); output.Add(" DisplayName: " + assetLib.DisplayName); output.Add(" FullFileName: " + assetLib.FullFileName); output.Add(" InternalName: " + assetLib.InternalName); output.Add(" IsReadOnly: " + assetLib.IsReadOnly); foreach (Inventor.Asset appearance in assetLib.AppearanceAssets) { output.Add(" Appearance"); output.Add(" DisplayName: " + appearance.DisplayName); output.Add(" Category: " + appearance.Category.DisplayName); output.Add(" HasTexture: " + appearance.HasTexture); output.Add(" IsReadOnly: " + appearance.IsReadOnly); output.Add(" Name: " + appearance.Name); foreach (Inventor.AssetValue value in appearance) { PrintAssetValue(value, 8); } } }
The oApp.AssetLibraries collection contains only one empty library "Favourites" . No matter if a document is open or not. Tested with ....inventor.interop.dll V. 18.
Any help would be great.
Christoph
Solved! Go to Solution.