How can i use ilogic to change a parts assembly?

How can i use ilogic to change a parts assembly?

sevaslan
Contributor Contributor
438 Views
5 Replies
Message 1 of 6

How can i use ilogic to change a parts assembly?

sevaslan
Contributor
Contributor

Hi. I have a assembly file which has a lot of iam files inside. I am trying to change the sub-assemblied parts flush using iLogic. I define some parameters as seen in screenshots but it doesn't change the flush when i try to change the number. For example i change "baski1" parameter from 1500 mm to 2000mm in the main assembly file. But it doesn't work . Could you help me please?

sevaslan_0-1650022541894.png

 

sevaslan_1-1650022625148.png

 

 

0 Likes
Accepted solutions (1)
439 Views
5 Replies
Replies (5)
Message 2 of 6

dalton98
Collaborator
Collaborator

If your trying to change the parameters in the sub assembly set it up like this

Parameter("BA Ic Dikme R:1", "baski1") = baski1

ThisApplication.ActiveDocument.Update
 
0 Likes
Message 3 of 6

sevaslan
Contributor
Contributor

sevaslan_0-1650266965699.pngsevaslan_1-1650266982517.pngsevaslan_2-1650266998813.pngsevaslan_3-1650267048239.pngsevaslan_4-1650267100770.pngThank you, but i try it. I got this error message. Could you give any suggestions?

0 Likes
Message 4 of 6

blandb
Mentor
Mentor

can you share the file?

Autodesk Certified Professional
0 Likes
Message 5 of 6

sevaslan
Contributor
Contributor

I can't share the file because of privacy policies of my company. Is there anything we can do?

0 Likes
Message 6 of 6

A.Acheson
Mentor
Mentor
Accepted solution

The error suggest it cannot find the file/parameter. Can you add the parameter by capturing? Then run the sub assembly parameter through a message box to ensure you have access before trying to change it. 

 

MessageBox.Show(Parameter("BA Ic Dikme R", "baski1"))

 Perhaps check also the value being supplied and ensure it works manually. 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
0 Likes