To Link Entities from Derived Part

To Link Entities from Derived Part

RoyWickrama_RWEI
Advisor Advisor
400 Views
1 Reply
Message 1 of 2

To Link Entities from Derived Part

RoyWickrama_RWEI
Advisor
Advisor

I do with huge master sketches consists of over couple of thousand parameters and the others.

I am thinking to get it easier to do with linking the item needed with  a generic iLogic rule. I was not successful in the rule below and I request help.

 

Sample files attached.

Sub main
	Dim oEntity_to_Link As New ArrayList
	oEntity_to_Link.Add("Solidbody")
	oEntity_to_Link.Add("Surfacebody")
	oEntity_to_Link.Add("Block")
	oEntity_to_Link.Add("Planner Sketch")
	oEntity_to_Link.Add("3D Sketch")
	oEntity_to_Link.Add("Work Plane")
	oEntity_to_Link.Add("Parameter")
	oEntity_to_Link.Add("Exit")

	L_oEntity_X:
	oEntity_X = InputListBox("TO LINK FROM DERIVED PART", oEntity_to_Link, "", Title := "SELECT ITEM TO LINK", ListName := "LIST OF ENTITIES")
	If oEntity_X = "" Then GoTo L_oEntity_X :
	If oEntity_X = "Exit" Then Exit Sub	
		
	If oEntity_X = "Solidbody" Then
		Link_Solidbody()
	Else If oEntity_X = "Surfacebody" Then
		Link_Surfacebody()
	Else If oEntity_X = "Block" Then
		Link_Block()
	Else If oEntity_X = "Planner Sketch" Then
		Link_Planner_Sketch()
	Else If oEntity_X = "3D Sketch" Then
		Link_3D_Sketch()
	Else If oEntity_X = "Work Plane" Then
		Link_Work_Plane()
	Else If oEntity_X = "Parameter" Then
		Link_Parameter()
	End If
End Sub


Sub Link_Solidbody()
	'Code (request help)
End Sub

Sub Link_Surfacebody()
	'Code (request help)	
End Sub

Sub Link_Block()
	'Code (request help)	
End Sub

Sub Link_Planner_Sketch()
	'Code (request help)	
End Sub

Sub Link_3D_Sketch()
	'Code (request help)	
End Sub

Sub Link_Work_Plane()
	'Code (request help)	
End Sub

Sub Link_Parameter()
	'Code (request help)
End Sub

2020-01-10 23_21_06-Window.png

 

 

 

 

0 Likes
401 Views
1 Reply
Reply (1)
Message 2 of 2

bradeneuropeArthur
Mentor
Mentor

Hi,

 

Try to do it this way...

Dim oDerivedPartComp As DerivedPartComponent
oDerivedPartComp = oPartCompDef.ReferenceComponents.DerivedPartComponents.item(1)
Dim oDerivedPartDef As DerivedPartDefinition
                oDerivedPartDef = oDerivedPartComp.Definition
                oDerivedPartDef.ActiveDesignViewRepresentation = ""
                oDerivedPartDef.IncludeAllParameters = False
                oDerivedPartDef.IncludeAllSolids = False
                oDerivedPartDef.IncludeAllSurfaces = False
                oDerivedPartDef.IncludeAllSketches = False
                oDerivedPartDef.IncludeAllworkFeatures = False

Regards,

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes