iLogic error when using "Open Drawing From Vault"

iLogic error when using "Open Drawing From Vault"

msweet7Y2GM
Participant Participant
625 Views
3 Replies
Message 1 of 4

iLogic error when using "Open Drawing From Vault"

msweet7Y2GM
Participant
Participant

Hello,

 

My company has a very simple iLogic rule that runs on an event trigger (After Open Document) to update a date field on our drawings. The rule establishes and saves a field from the following:

 

iProperties.Value("Custom", "Year Saved") = Now.ToString("yyyy")

 

We have everything set up correctly and never encountered errors until Inventor introduced the "Open Drawing From Vault" command in the context of a part or assembly file. Every time a drawing is opened using this, we encounter the following error:

 

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

 

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.Property.set_Value(Object )
at ThisRule.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)

 

I can open the same drawing from my local drive via Inventor or from the Vault client with no issues - only this context causes the error. Any idea why this might be happening and what we can do to fix it?

 

Thanks!

 

 

0 Likes
626 Views
3 Replies
Replies (3)
Message 2 of 4

chandra.shekar.g
Autodesk Support
Autodesk Support

@msweet7Y2GM ,

 

Hoping that below changes to code may be helpful.

ThisApplication.[_LibraryDocumentModifiable] = True                              
iProperties.Value("Custom", "Year Saved") = Now.ToString("yyyy")              
ThisApplication.[_LibraryDocumentModifiable] = False 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 3 of 4

lukerietdyk
Enthusiast
Enthusiast

Hi,

 

Was this ever resolved or a fix found? Did the suggested additions to the code make a difference? I am having the same problem with the same workflow (an ilogic script to update the title block which is triggered by opening the document) in the same scenario (opening drawing from Vault, from within assembly context).

 

Thanks,

0 Likes
Message 4 of 4

jaco011
Advocate
Advocate

Did you find an solution? I am searching too. (tried solution above and it didn't work)

0 Likes