VBA, VB.NET For Creo
Get parameter values included in feature - IpfcModelItemOwner
ToolBOX01
2025. 1. 18. 18:13
반응형
▷ VBA coding order
- Retrieves feature object information.
- Displays the parameter values contained in the feature
▷ Feature Name
- "SURFACE_AREA" Parameter Name: AREA
▷ Code : Model > Feature > Parameter
Dim Model As pfcls.IpfcModel
Dim Modelowner As pfcls.IpfcModelItemOwner
Dim Featureitem As pfcls.IpfcModelItem
Dim ParameterOwner As pfcls.IpfcParameterOwner
Dim Parameter As pfcls.IpfcParameter
Dim BaseParameter As pfcls.IpfcBaseParameter
Dim ParamValue As pfcls.IpfcParamValue
Set ModelItemOwner = Model
Set Featureitem = ModelItemOwner.GetItemByName(EpfcModelItemType.EpfcITEM_FEATURE, "SURFACE_AREA")
Set ParameterOwner = Featureitem
Set Parameter = ParameterOwner.GetParam("AREA")
Set BaseParameter = Parameter
Set ParamValue = BaseParameter.Value
Deburg.Print ParamValue.DoubleValue
참고