Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

changing derived parameters

5 REPLIES 5
Reply
Message 1 of 6
Ralf_Krieg
695 Views, 5 Replies

changing derived parameters

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 GmbH
www.rkw-solutions.com
5 REPLIES 5
Message 2 of 6
Anonymous
in reply to: Ralf_Krieg

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

Message 3 of 6

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

 

Message 4 of 6

Hello

 

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


R. Krieg
RKW Solutions GmbH
www.rkw-solutions.com
Message 5 of 6
Anonymous
in reply to: Ralf_Krieg

Thanks Sanjay!

Message 6 of 6
PACDrafting
in reply to: Ralf_Krieg

Hi Sanjay

 

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

 

Thanks

Paul

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report