update ilogic rule when filenames change

update ilogic rule when filenames change

Anonymous
Not applicable
2,750 Views
6 Replies
Message 1 of 7

update ilogic rule when filenames change

Anonymous
Not applicable

Hello all,

 

I have created an assembly where i have written a long ilogic rule which relates parameters for different parts and assembly parameters.

for example

z = 10
Parameter
("bodychannel:1", "width") = z + 2*Parameter("bodychannel:1", "Thickness")

I have created a model assembly using such ilogic rules. Now i change the assembly part names using design assistant. for example

i change the part name bodychannel to 11.00.01.

 

BUT, When i open the assembly the rule does not get updated automatically with the new name.

Can someone suggest me a way where the filenames in the rules get updated automatically when i change the name in design assistant.

 

Thanks,

Sid

Using Inventor 2011

 

 

 

 

 

0 Likes
2,751 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

So, there's a bit of info I am missing on my end due to my lack of expertise, but could you change the part of your rule that specifically calls out the part name in a static way to calling out the part name in a dynamic way?

 

Sorry, I'm not sure how to get the right text in the "oDoc.FileName" part, but maybe someone else can chime in. In the meantime, perhaps you can take this bit and run with it?

 

z = 10
Dim PartName as String
PartName = oDoc.FileName & ":1" 'This is the part I am not sure about, but hopefully it gets my idea across

Parameter
(PartName, "width") = z + 2*Parameter(PartName, "Thickness")
0 Likes
Message 3 of 7

Anonymous
Not applicable

I feel the idea is right.But even i am looking out for the exact way of denoting the part name. 

Can anyone pitch in here and help out?

 

Thanks dkatz. I will let you know if i get something.

0 Likes
Message 4 of 7

Anonymous
Not applicable

You want the description in the browser to remain the same so that each time the code calls up the part it's name remains the same. This may be done by right clicking the part in the browser and under "Occurrence" setting the name to a choosen name such as "BodyChan1". The name will now remain the same regardless of whether the part is replaced by code or by design assistant. Your code must refer to "BodyChan1"

 

Hope I explained it clearly

Message 5 of 7

cwhetten
Advisor
Advisor

@Anonymous is exactly right.  I just want to add that it is possible to rename the component occurrence in the browser, without having to go to iProperties > Occurrence tab.  Simply select the component in the browser, then click it again (not a fast double-click, just click-wait-click).  This will allow you to edit the component name right there.  See the video below for an example.

 

 

 

In this video, you'll see that you can also revert the component back to its original name by erasing the name and pressing enter.

 

Also, I like to add an underscore to the beginning of every component that I rename, just so I instantly know which parts have been renamed or not.  It's just something I find helpful.

 

Cameron Whetten
Inventor 2014

Message 6 of 7

JimmyDoe
Collaborator
Collaborator

So I have a 'generic' top down assembly. When we get an order, I Vault copy design it it to the associated work order. But now all my rules that use the display name no longer work, once I copy the files. Am I completely screwed? Can I do something so that the display name does not update based on the file name? Or is all my code worthless if I change the file name?

I'm very scared right now..Man Sad

0 Likes
Message 7 of 7

Ted.F
Participant
Participant

Jimmy,

 

  Have you tried using the "place iLogic component" option instead? I have handled this situation the following way:

 

1. Create a  new assembly

2. Save assembly as required name (job no, order no, etc.)

3. Place iLogic component (it will add an -01, -02 etc. to that assembly and non-standard parts)

4. Configure assembly when placing

5. Save Master assembly

 

If needed you can rename (normalize) files in the browser. Just a thought.

0 Likes