System.Object
EPLAN.Harness.API.DataStructures.BaseAppearanceInfo
EPLAN.Harness.API.DataStructures.Appearance.MaterialInfo
System.Object
EPLAN.Harness.API.DataStructures.BaseAppearanceInfo
EPLAN.Harness.API.DataStructures.Appearance.MaterialInfo
public class MaterialInfo : EPLAN.Harness.API.DataStructures.BaseAppearanceInfo
Project project = ... OccWdBundle occurrence = ... ActiveLibraryConnection activeLibrary = null; IEnumerable<MaterialInfo> materials = null; try { activeLibrary = project.ActiveConnection; if (activeLibrary == null) { materials = MaterialInfo.GetPredefinedMaterials(); } else { materials = activeLibrary.GetMaterials(); } } catch (API.Exceptions.NoActiveLibraryException ex) { materials = MaterialInfo.GetPredefinedMaterials(); } MaterialInfo material = materials.FirstOrDefault(m => m.Name.Value == "My favourite material"); if (material == null) { Console.WriteLine("Material not found."); } else { occurrence.Material = material; }
Name | Description | |
---|---|---|
Name | Name of this appearance. (Inherited from EPLAN.Harness.API.DataStructures.BaseAppearanceInfo) | |
Preview | Overridden. Preview of this appearance. |
Name | Description | |
---|---|---|
Equals | Is this appearance equal to the following object? (Inherited from EPLAN.Harness.API.DataStructures.BaseAppearanceInfo) | |
GetHashCode | Serves as the default hash function. (Inherited from EPLAN.Harness.API.DataStructures.BaseAppearanceInfo) | |
GetPredefinedMaterials | Gets predefined materials. These are not real materials but only colors. |