iLogic/Assembly User Parameters

iLogic/Assembly User Parameters

SleikerBF
Contributor Contributor
405 Views
3 Replies
Message 1 of 4

iLogic/Assembly User Parameters

SleikerBF
Contributor
Contributor

Is there a way to have access to the user parameters for parts in an assembly? I know you can link parameters but doesn't let you change those user parameter in the part when you're in the assembly. Is there a way around this?

0 Likes
406 Views
3 Replies
Replies (3)
Message 2 of 4

Darkforce_the_ilogic_guy
Advisor
Advisor

I do not know if you can use this ... but I have this code that was not what i want for my use .. but what it do is that it is that you run the run and then selecte that you want to make the chance in , and type the new value and it will change ... it this case I believe it change B_L that change the length of my part . you might be enble  to change it for your use i hope

0 Likes
Message 3 of 4

johnsonshiue
Community Manager
Community Manager

Hi! Yes, absolutely. That is one of the advantages of using iLogic in an assembly. It allows you to access all parameters in a part within the assembly. You need to create the rule at the top-level assembly. In the iLogic browser tree, you can capture the parameters and assign values to the parameters. Is it not working for you? Please try it out. If you cannot figure out, please share an example here so forum experts can take a look.

Many thanks!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 4 of 4

Sub Main()
Dim oPart As ComponentOccurrence = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select FG component")
setBL(oPart)


End Sub
Sub setBL(oOcc As ComponentOccurrence)
	Try
		Dim B_Lpar As Inventor.Parameter = oOcc.Definition.Parameters.UserParameters.Item("B_L")
		myparam = InputBox("Set length", "Content center member", B_Lpar.Value * 10) 'database units is cm so convert to mm
		B_Lpar.Value = myparam / 10 'set value in database units
		InventorVb.DocumentUpdate()
	Catch

		'iLogicVb.RunExternalRule("EditLengthOfOldTypeProfile")

	End Try
	
	InventorVb.DocumentUpdate()
End Sub

 

Sorry it look like i forgot the code .-. hobe this help

 

0 Likes