changing derived parameters

changing derived parameters

Ralf_Krieg
Advisor Advisor
820 Views
5 Replies
Message 1 of 6

changing derived parameters

Ralf_Krieg
Advisor
Advisor

hello

 

Can anyone tell me why this Code does nothing? I suggest, that the Parameter will not longer be derived.

 

Private Sub UnlinkDerivedPrameter()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oDPC As DerivedPartComponent
Set oDPC = oDoc.ComponentDefinition.Features.ReferenceFeatures.Item(1).ReferenceComponent

oDPC.Definition.Parameters.Item(1).IncludeEntity = False

End Sub


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
821 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Hi krieg,

Did you find a solution to this?

I'm also working with derived parameters.

 

Feel free to email me at:

sdiaz at structurecraft dot com

 

Cheers,

 

Santiago

0 Likes
Message 3 of 6

sanjay.ramaswamy
Alumni
Alumni

The definition obtained from the component is a tear-off and does not maintain a live link. You need to set the modified definition back to the component. Something like this...

 

Private Sub UnlinkDerivedPrameter()
Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument

Dim oDPC As DerivedPartComponent
Set oDPC = oDoc.ComponentDefinition.Features.ReferenceFeatures.Item(1).ReferenceComponent

Dim oDPD As DerivedPartDefinition
Set oDPD = oDPC.Definition

oDPD.Parameters.Item(1).IncludeEntity = False

oDPC.Definition = oDPD

End Sub

 

0 Likes
Message 4 of 6

Ralf_Krieg
Advisor
Advisor

Hello

 

Once again, a perfect answer to my question. Thanks a lot Sanjay. 🙂


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 5 of 6

Anonymous
Not applicable

Thanks Sanjay!

0 Likes
Message 6 of 6

PACDrafting
Collaborator
Collaborator

Hi Sanjay

 

This allows you to remove the derived parameter. How do you include a dervied parameter?

 

Thanks

Paul

0 Likes