The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Sheet metal flat pattern

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Sheet metal flat pattern

danie4F4P2
Explorer Explorer
1,087 Views
7 Replies
Message 1 of 8

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Sheet metal flat pattern

danie4F4P2
Explorer
Explorer

I run a short iLogic code that assign the width length and thickness to user parameter.

It worked perfectly until recently it started giving the following error

 

The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))

 

what could cause the error all of a sudden ?

 

The user parameters  is created before the code is run:

danie4F4P2_0-1694079795774.png

 

Here is ilogic code:

t = SheetMetal.FlatExtentsLength
w = SheetMetal.FlatExtentsWidth

 

 

0 Likes
1,088 Views
7 Replies
Replies (7)
Message 2 of 8

WCrihfield
Mentor
Mentor

Hi @danie4F4P2.  I don't know if you were aware of this or not, but using that iLogic shortcut snippet will actually attempt to create a FlatPattern of your sheet metal part, if one does not already exist, before returning the value you are looking for.  So, if it has a problem flattening your part, or creating the FlatPattern, that might cause an error.  Are there any ModelStates present in that part (other than the original one).  Is the part an iPartMember or Content Center part?

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 8

danie4F4P2
Explorer
Explorer

Yes I am aware that it creates the flat pattern. It has no problem creating the flat pattern. It is just a regular sheet metal part. No ModelStates present

0 Likes
Message 4 of 8

A.Acheson
Mentor
Mentor

If you remove the parameter setting and just put each sheetmetal length into a message box does that work? Can you share the more info tab of the error message? 

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

danie4F4P2
Explorer
Explorer

danie4F4P2_0-1694150071866.png

 

0 Likes
Message 6 of 8

A.Acheson
Mentor
Mentor

Can you share the complete code? Error message states error on line 31. Only 2 lines have been provided. Is the code running on the part in an assembly? What context are you running the rule? Can you share the browser info? Any features suppressed that will still the flat pattern being generated? 

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

danie4F4P2
Explorer
Explorer

There is only 2 lines of code. The code is running from a sheetmetal part environment. 

It has no problem creating the flat pattern. It also works if there is no bends in the sheet metal. only if the part is bend or rolled it gives the error. 

 

the ilogic rule is in the sheet metal part template and is triggered when part geometry change

 

danie4F4P2_0-1694153042686.png

 

0 Likes
Message 8 of 8

danie4F4P2
Explorer
Explorer

This error only occurs on my computer. It works perfectly on all the other computers in our office

0 Likes