TO SETUP DERIVED PART DIALOG BOX SETTINGS

TO SETUP DERIVED PART DIALOG BOX SETTINGS

RoyWickrama_RWEI
Advisor Advisor
430 Views
2 Replies
Message 1 of 3

TO SETUP DERIVED PART DIALOG BOX SETTINGS

RoyWickrama_RWEI
Advisor
Advisor

I frequently have to create derived parts at skeleton modelling.

Could some one provide me with a rule so that derived part dialog box made to appear as shown below.

ALSO USE COLOR OVERRIDE FROM SOURCE COMPONENT TICKED OFF.

 

Thanks a lot for the help.

 

2019-02-26 1157.png

0 Likes
Accepted solutions (1)
431 Views
2 Replies
Replies (2)
Message 2 of 3

JaneFan
Autodesk
Autodesk
Accepted solution

Hey @RoyWickrama_RWEI , 

 

Here is the iLogic rule to do so: 

Dim oPD As PartComponentDefinition 
oPD = ThisDoc.Document.ComponentDefinition

Dim DD As DerivedPartDefinition 
DD = oPD.ReferenceComponents.DerivedPartComponents.CreateUniformScaleDef("Full path of derived part")

DD.ExcludeAll()
DD.UseColorOverridesFromSource = fasle 

Dim oPDC As DerivedPartComponent 
oPDC = oPD.ReferenceComponents.DerivedPartComponents.Add(DD)



Jane Fan
Inventor/Fusion QA Engineer
Message 3 of 3

RoyWickrama_RWEI
Advisor
Advisor

Hi Jane;

 

It is a good code.  

I revised it as follows.

I have the full document name copied in the clip board as a result of running another code. It works. My only concern is I need the Derived Part dialog box remains open so that I can turn on the required variables or work features.

Could you fix it, please. Thanks.

 

Imports System.Windows.Forms

Sub main()
Dim oPD As PartComponentDefinition 
oPD = ThisDoc.Document.ComponentDefinition

Dim DD As DerivedPartDefinition 
'DD = oPD.ReferenceComponents.DerivedPartComponents.CreateUniformScaleDef("Full path of derived part")
oDoc_Source = Clipboard.GetText()
DD = oPD.ReferenceComponents.DerivedPartComponents.CreateUniformScaleDef(oDoc_Source)

DD.ExcludeAll()
DD.UseColorOverridesFromSource = fasle 

Dim oPDC As DerivedPartComponent 
oPDC = oPD.ReferenceComponents.DerivedPartComponents.Add(DD)

End Sub

 

 

0 Likes