Message 1 of 6
Where is my parameter used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
ModelParameter Object
Dependents | Property that returns the collection of objects that have a direct dependency on the parameter. |
Like @JaneFan Said
"Sorry for the inconvenience.
There is an issue here: Dependents of user parameters can return correctly, while that of model parameter returns blank object collection even there should be something in there. It has been tracked in our issue system."
at :
i think it will same issue at assembly parameters to get consume parameter from what constraints.
I asked the same question not long ago.
Hi,
I have new info for this issue, maybe it you solution.
try this, I have example for indetify In Use in Part Document
Public Sub IdentifyParameterUseIn()
Dim app As Application
Set app = ThisApplication
Dim oPD As PartDocument
Set oPD = app.ActiveDocument
Dim oPCD As PartComponentDefinition
Set oPCD = oPD.ComponentDefinition
Dim oParam As Parameters
Set oParam = oPCD.Parameters
Dim oMP As ModelParameter
Dim oSkt As Sketch
Dim ParentCompDef As PartComponentDefinition
Dim oFeat As PartFeature
Dim oFeatParam As Parameter
Dim DimCon As DimensionConstraints
Dim SktParam As DimensionConstraint
'call Model Parameter
For Each oMP In oParam.ModelParameters
'call parent of model parameter
Set ParentCompDef = oMP.Parent.ComponentDefinition
For Each oSkt In ParentCompDef.Sketches
Set DimCon = oSkt.DimensionConstraints
For Each SktParam In DimCon
If SktParam.Parameter.Name = oMP.Name Then
MsgBox "Parameter Name " & oMP.Name & " is Consumed By " & oSkt.Name
End If
Next
Next
For Each oFeat In ParentCompDef.Features
For Each oFeatParam In oFeat.Parameters
If oFeatParam.Name = oMP.Name Then
MsgBox "Parameter Name " & oMP.Name & " is Consumed By " & oFeat.Name
End If
Next
Next
Next
End Sub
Hello @dgreatice
is it possible to extend this to include parameters consumed by offset planes?
Cheers,
Omar