Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Inventor user parameters not updating properly, even after Rebuild

11 REPLIES 11
Reply
Message 1 of 12
Majjek
417 Views, 11 Replies

Inventor user parameters not updating properly, even after Rebuild

Hello,

 

I'm facing an issue which seems to keep reoccurring in similar situations and looks a lot like a bug.

Some parameters won't update their values in an .ipt, even after updating the model or rebuilding it multiple times (manually or via API). There's also no Update symbol which is active (lightning bolt).

The expression for these parameters are simple divisions, not complex equations (which shouldn't matter anyway).

 

In this example, the user parameter 'z' is calculated by dividing a reference parameter 'd43' through a linked parameter 'n' from a different file.

The calculated value shows ~405,2mm, while the actual value should be ~295,4mm.

Also see the image below.

 

When I use the 'GetValueFromExpression' method on the Parameters object, it does actually return the correct value.

 

Another manual action to trigger the correct calculation, is to modify the expression, for example adding '+1' to the exression, calculate it, and remove it again.

But this is of course in no way workable, but it shows that there's really something wrong in the update.

 

Majjek_0-1712582585324.png

 

Is anybody familiar with this behavior?

It's causing us to loose trust in Inventor, because we don't always notice these errors, or sometimes, even worse, in a later stadium in our production line.

 

The complete workflow:

- From an Excel sheet, parameters will be pushed to an Inventor .ipt via an Excel macro.

- A second .ipt will be opened which only holds 2 sketches and uses the parameters from the first part as linked parameters.

- Some iLogic rules update the model and rebuild it. But as said, this doesn't do anything.

 

(it's divided between 2 files, because pushing parameters to a file with no other sketches is a lot faster than pushing parameters to a file without sketches, because every parameter will trigger some updating. By doing it via linked parameters, all parameters will be updated at once).

11 REPLIES 11
Message 2 of 12
A.Acheson
in reply to: Majjek

Hi @Majjek 

 

Disregarding your code interaction for a second does the manual method to update the parameters in the .ipts work for you? If so can you list in bullet list the steps that work.

 

I have expierienced issues of values not updating by code and the reason for these can be as simple as not updating the document correctly or using local parameter values which are only updated when the rule finishes when you really need them updated when the rule is working. I have also seen occasion when a sketch has been updated via code especially driven values that the sketch needs to be edited in order for the update to be processed  this would also be a good thing to rule out. 

 

When their is code interaction we really need to see the whole interaction so as to eliminate code errors. Keep in mind that when working with code you have the ilogic API which has certain level of interaction and you also have the inventor API which lets you access more specific interactions. Knowing which one you need will depend on what manual operation your trying to replicate. A combination of both API might be necessary. Can you attach the completed workflow including the code and your inventor version? 

If this solved a problem, please click (accept) as solution.‌‌‌‌
Or if this helped you, please, click (like)‌‌
Regards
Alan
Message 3 of 12
Majjek
in reply to: A.Acheson

Hi @A.Acheson ,

 

Good question.

Unfortunately the problem persists even when I manually enter the parameters in the first part and update it (with Immediate Update turned on, or off and with manual update) and then open the second part and update it.

I'm not running any iLogic rules in this case (in fact I've deleted them for this test).

So it definitely seems to have something to do with the update sequence in Inventor.

 

I've found 2 ways to get the calculation correct at least for the parameter that I know is incorrect (I can't check every parameter):

- When opening the second part, before updating it, perform a Rebuild All on the second part first.

This causes an error in the first sketch of that part, but I have the iLogic rule to fix that error (it's an iterative calculation in the sketch, so when the sketch becomes complex, it will fail, while it doesn't fail when that sketch isn't complex). After that, the value is correct.

- There are 2 sketches in the second part, when I first delete the second sketch and then update it, the value is also correct. The strange thing is that the second sketch doesn't have anything to do with the referenced parameter used in the expression, that's in the first sketch.

The second sketch does project some entities from the first sketch.

 

So with that, I think we can rule out the code.

Message 4 of 12
johnsonshiue
in reply to: Majjek

Hi! The parameter update should work in a logical manner: the source updates and then the follower updates. If it does not work, it will mean a bug. Something is not working correctly. Please share the files in zip here or send it to me johnson.shiue@autodesk.com directly. I would like to understand the behavior better.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 5 of 12
peter.roman
in reply to: Majjek

I've come across this as well.

I don't use linked excel files but I think it was when updates are pushed through derived links, but I'm pretty sure it's happened even when the update needs to get pushed between model (sketch), user and reference parameters (via formulas) in the same part. (ie the immediately affected parameter will be updated, then maybe a reference parameter is updated but the update doesn't propagate to parameters further "downstream").

And the only fix is to manually change the formula then revert (ie. +1, then delete), rebuild doesn't work.

Message 6 of 12
Majjek
in reply to: johnsonshiue

Hi @johnsonshiue ,

 

I've sent the files to you personally, since they contain sensitive information.

Message 7 of 12
johnsonshiue
in reply to: Majjek

Hi Mark,

 

Many thanks for sharing the files! I did receive the files. Without disclosing the detail, I can comment on the issue as the following. It does seem that the parameters in the source part do not trigger an update on the other part is linked to the parameters.

The particular parameter of interest is a reference parameter from a driven dimension in a sketch. It is unclear to me why the change in the source parameters does not propagate to the linked part. There seems to be a sketch solve issue. We need to understand why the sketch does not change the shape (the driven dimension should change accordingly).

Thanks again!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 8 of 12
jeffsteiger6735
in reply to: Majjek

I'm having a similar issue with a referenced parameter not updating. Tried all the usual tricks to no avail.

Inventor Professional 2020
HP Z440, Xeon E5-1650 @ 3.6GHz
32GB Ram
GTX 1080
Windows 10
Message 9 of 12

Hi Jeff,

 

Though the behavior might sound similar, the actual cause could be different. If possible, please share the files in zip with me directly johnson.shiue@autodesk.com. I would like to understand the parameter update issue better.

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 10 of 12
m_benschopXQW9W
in reply to: Majjek

Hi @johnsonshiue ,

I've encountered a similar issue in an assembly. I pattern a hole in the machining environment, and the pattern length is linked to a driven sketch dimension. When the part changes size, the driven sketch dimension also changes, but the pattern only updates after performing a "Rebuild All."

In the parameter display box, you can see that the dimension has changed, but the linked parameter does not update automatically. I've attached a video demonstrating this issue with a simple part.

Has anyone found a solution to ensure that linked parameters update correctly without requiring a manual rebuild?

I wil send the files to your personal account to verify

Message 11 of 12

Hi!

 

Many thanks for sharing the files! I believe I have seen this behavior before. It has something to do with how the assembly sketch is computed. It seems that the update is strictly sequential in this case. The assembly rectangular pattern computes earlier than the parameter. It requires an additional update to make things up-to-date (Rebuild All fixes it).

I recall it was investigated by the project team but there was no suitable solution found unfortunately. Rebuild All can be considered a workaround for the time being.

Thanks again!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
Message 12 of 12

Oke, thank you for your response

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report