12-20-2016
08:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
12-20-2016
08:22 PM
Thank you !!
Actually, I need to add a custom material and apply that to part document.
I never worked on material yet. So don't know how it works. What all I have for my material is only name for e.g. "CustomMaterial". Rest material properties can be default.
I have few questions :
1. Can we add custom material ? If yes, how can we ?
2. How to apply that custom material ?
3. Is there any working C# code snippet ?
I tried your snippet as below :
ThisApplication = (Inventor.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application");
foreach (AssetLibraries lib in ThisApplication.AssetLibraries)
{
foreach (AssetLibrary assetlib in lib)
{
string name = assetlib.DisplayName;
}
}But it's crashing at highlighted code above.