Solid Edge Framework Type Library > MatTable Object : GetCustomMaterialPropertyFromLibrary Method |
Visual Basic |
---|
Public Sub GetCustomMaterialPropertyFromLibrary( _ ByVal bstrMatName As String, _ ByVal bstrMatLibName As String, _ ByVal nPropIndex As Integer, _ ByRef bstrPropName As String, _ ByRef ePropUnitType As UnitTypeConstants, _ ByRef 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.Runtime.InteropServices Public Class Form1 Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim objApp As SolidEdgeFramework.Application = Nothing Dim objType As Type = Nothing Dim objMatTable As SolidEdgeFramework.MatTable = Nothing Dim strLibrary As String = "Materials" Dim objDocument As SolidEdgePart.PartDocument = Nothing Dim strMaterial As String = "" Dim strMessage As String Dim varGetPropVal As Object = Nothing Dim nUnitType As SolidEdgeFramework.UnitTypeConstants = 0 Dim strPropName As String = "" Try ' Get SE handle objApp = Marshal.GetActiveObject("SolidEdge.Application") If objApp Is Nothing Then ' Get the type from the Solid Edge ProgID objType = Type.GetTypeFromProgID("SolidEdge.Application") ' Start Solid Edge objApp = Activator.CreateInstance(objType) ' Make Solid Edge visible objApp.Visible = True End If ' Get material table object handle objMatTable = objApp.GetMaterialTable() strMaterial = "Steel" objMatTable.AddCustomProperty(strMaterial, strLibrary, "My Custom Property ", 1, 152.66) objMatTable.AddCustomProperty(strMaterial, strLibrary, "SE Custom Property ", 13, 42.98) objMatTable.GetCustomMaterialPropertyFromLibrary(strMaterial, strLibrary, 1, strPropName, nUnitType, varGetPropVal) strMessage = String.Format("Custom Property of STEEL - Name: {0}, Unit Type: {1}, Value: {2}", strPropName, nUnitType, varGetPropVal) MsgBox(strMessage) Catch ex As Exception MsgBox(ex.ToString) End Try End Sub End Class