Solid Edge Framework Type Library > MatTable Object : AddCustomProperty Method |
Visual Basic |
---|
Public Sub AddCustomProperty( _ ByVal bstrMatName As String, _ ByVal bstrMatLibName As String, _ ByVal bstrPropName As String, _ ByVal ePropUnitType As UnitTypeConstants, _ ByVal varPropValue As Variant _ ) |
Value | Description |
---|---|
igUnitAmountOfSubstance | Unit Type - Amount of Substance |
igUnitAngle | Unit Type - Angle |
igUnitAngularAcceleration | Unit Type - Angular Acceleration |
igUnitAngularMomentum | Unit Type - Angular Momentum |
igUnitAngularVelocity | Unit Type - Angular Velocity |
igUnitArea | Unit Type - Area |
igUnitBodyForce | Unit Type - Body Force |
igUnitCoefficientOfThermalExpansion | Unit Type - Coefficient of Thermal Expansion |
igUnitDensity | Unit Type - Density |
igUnitDistance | Unit Type - Distance |
igUnitDynamicViscosity | Unit Type - Dynamic Viscosity |
igUnitElectricalCapacitance | Unit Type - Electrical Capacitance |
igUnitElectricalConductance | Unit Type - Electrical Conductance |
igUnitElectricalFieldStrength | Unit Type - Electrical Fieldf Strength |
igUnitElectricalInductance | Unit Type - Electrical Inductance |
igUnitElectricalPotential | Unit Type - Electrical Potential |
igUnitElectricalResistance | Unit Type - Electrical Resistance |
igUnitElectricCharge | Unit Type - Electrical Charge |
igUnitEnergy | Unit Type - Energy |
igUnitEnergyDensity | Unit Type - EnergyDensity |
igUnitEntropy | Unit Type - Entropy |
igUnitFilmCoefficient | Unit Type - Film Coefficient |
igUnitForce | Unit Type - Force |
igUnitForcePerArea | Unit Type - Force Per Area |
igUnitForcePerDistance | Unit Type - Force Per Distance |
igUnitFrequency | Unit Type - Frequency |
igUnitHeatCapacity | Unit Type - Heat Capacity |
igUnitHeatFluxPerArea | Unit Type - Heat Flux Per Area |
igUnitHeatFluxPerDistance | Unit Type - Heat Flux Per Distance |
igUnitHeatGeneration | Unit Type - Heat Generation |
igUnitHeatSource | Unit Type - Heat Source |
igUnitIlluminance | Unit Type - Illuminance |
igUnitKinematicViscosity | Unit Type - Kinematic Viscosity |
igUnitLinearAcceleration | Unit Type - Linear Acceleration |
igUnitLinearPerAngular | Unit Type - Linear Per Angular |
igUnitLinearVelocity | Unit Type - Linear Velocity |
igUnitLuminousFlux | Unit Type - Luminous Flux |
igUnitLuminousIntensity | Unit Type - Luminous Intensity |
igUnitMagneticFieldStrength | Unit Type - Magnetic Field Strength |
igUnitMagneticFlux | Unit Type - Magnetic Flux |
igUnitMagneticFluxDensity | Unit Type - Magnetic Flux Density |
igUnitMass | Unit Type - Mass |
igUnitMassFlowRate | Unit Type - Mass Flow Rate |
igUnitMassMomentOfInertia | Unit Type - Mass Moment of Inertia |
igUnitMassPerArea | Unit Type - Mass Per Area |
igUnitMassPerLength | Unit Type - Mass Per Length |
igUnitMomentum | Unit Type - Momentum |
igUnitPerDistance | Unit Type - Per Distance |
igUnitPower | Unit Type - Power |
igUnitPressure | Unit Type - Pressure |
igUnitQuantityOfElectricity | Unit Type - Quantity of Electricity |
igUnitRadiantIntensity | Unit Type - Radiant Intensity |
igUnitRotationalStiffness | Unit Type - Rotation Stiffness |
igUnitScalar | Unit Type - Scalar |
igUnitSecondMomentOfArea | Unit Type - Second Moment of Area |
igUnitSolidAngle | Unit Type - Solid Angle |
igUnitTemperature | Unit Type - Temperature |
igUnitTemperatureGradient | Unit Type - Temperature Gradient |
igUnitThermalConductivity | Unit Type - Thermal Conductivity |
igUnitTime | Unit Type - Time |
igUnitTorque | Unit Type - Torque |
igUnitVolume | Unit Type - Volume |
igUnitVolumeFlowRate | Unit Type - Volume Flow Rate |
Imports System Imports System.Runtime.InteropServices Namespace Examples Friend Class Program <STAThread> Shared Sub Main(ByVal args() As String) Dim application As SolidEdgeFramework.Application = Nothing Dim materialTable As SolidEdgeFramework.MatTable = Nothing Try ' See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic. OleMessageFilter.Register() ' Attempt to connect to a running instance of Solid Edge. application = DirectCast(Marshal.GetActiveObject("SolidEdge.Application"), SolidEdgeFramework.Application) materialTable = application.GetMaterialTable() Dim materialName = "Steel" Dim libraryName = "Materials" materialTable.AddCustomProperty(materialName, libraryName, "My custom property", SolidEdgeFramework.UnitTypeConstants.igUnitDistance, 152.66) Catch ex As System.Exception Console.WriteLine(ex) Finally OleMessageFilter.Unregister() End Try End Sub End Class End Namespace
using System; using System.Runtime.InteropServices; namespace Examples { class Program { [STAThread] static void Main(string[] args) { SolidEdgeFramework.Application application = null; SolidEdgeFramework.MatTable materialTable = null; try { // See "Handling 'Application is Busy' and 'Call was Rejected By Callee' errors" topic. OleMessageFilter.Register(); // Attempt to connect to a running instance of Solid Edge. application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application"); materialTable = application.GetMaterialTable(); var materialName = "Steel"; var libraryName = "Materials"; materialTable.AddCustomProperty(materialName, libraryName, "My custom property", SolidEdgeFramework.UnitTypeConstants.igUnitDistance, 152.66); } catch (System.Exception ex) { Console.WriteLine(ex); } finally { OleMessageFilter.Unregister(); } } } }