Link/load parameters from other part using ilogic

Anonymous

Link/load parameters from other part using ilogic

Anonymous
Not applicable

Hello,

I want to Link/load parameters from other part, if i use below iLogic it shows error (refer attachment). can anyone help me to solve this problem.

If Parameter("C:\Inventor_DATA_2\part_01.ipt", "Li_length_with_TF") > 1000 Then
Feature.IsActive("Lofted Flange3") =False
End If

 

 

0 Likes
Reply
Accepted solutions (2)
517 Views
3 Replies
Replies (3)

Sergio.D.Suárez
Mentor
Mentor
Accepted solution

Hi, this could be an alternative way to access a parameter from another file. I have placed a message box for you to check the units before generating equality. Because the internal unit of Inventor is "cm".
The rule defines the external document, opens it in hidden mode and accesses its parameters. Then start the equality and finally close the open document in hidden mode .. Greetings
I hope the rule works and is useful

 

Dim oDoc As Document = ThisApplication.Documents.Open("C:\Inventor_DATA_2\part_01.ipt", False)
Param = oDoc.componentdefinition.parameters("Li_length_with_TF")

MessageBox.Show(Param.value)

If Param.Value > 1000 Then
Feature.IsActive("Lofted Flange3") =False
End If

oDoc.Close

 


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

0 Likes

Sergio.D.Suárez
Mentor
Mentor
Accepted solution

Hi, this could be an alternative way to access a parameter from another file. I have placed a message box for you to check the units before generating equality. Because the internal unit of Inventor is "cm".
The rule defines the external document, opens it in hidden mode and accesses its parameters. Then start the equality and finally close the open document in hidden mode .

 

Dim oDoc As Document = ThisApplication.Documents.Open("C:\Inventor_DATA_2\part_01.ipt", False)
Param = oDoc.componentdefinition.parameters("Li_length_with_TF")

MessageBox.Show(Param.value)

If Param.Value > 1000 Then
Feature.IsActive("Lofted Flange3") =False
End If

oDoc.Close

Once the values have been checked you can delete the message box.
I hope the rule works and is useful. Greetings


Please accept as solution and give likes if applicable.

I am attaching my Upwork profile for specific queries.

Sergio Daniel Suarez
Mechanical Designer

| Upwork Profile | LinkedIn

Anonymous
Not applicable

Hello @Sergio.D.Suárez ,

 

Thank you its working fine.

 

 

 

0 Likes