Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Error (137) on DocumentService.UpdateFileAssociationReferences call.

9 REPLIES 9
Reply
Message 1 of 10
NLeininger
827 Views, 9 Replies

Get Error (137) on DocumentService.UpdateFileAssociationReferences call.

Below is my code.  I'm trying to copy a project which means all folders and files are copied.  After I copy the folder and files I go back through and update the references to use the newly copied files and their locations.

 

updateRefs.jpg

9 REPLIES 9
Message 2 of 10
Daniel.Du
in reply to: NLeininger

According to the error message 137, it means 

 

137

IllegalInputParam 

One of the inputs to the service call is incorrect.

 

It supposed to be : 

 

FileAssocArray[] fileAssocArrays = webMgr.DocumentService.GetLatestFileAssociationsByMasterIds(
new long[] { file.MasterId },
FileAssociationTypeEnum.None,
false, //parentRecurse
FileAssociationTypeEnum.Dependency,
true,
false,
false,
false);

 



Daniel Du
Developer Technical Services
Autodesk Developer Network

Message 3 of 10
NLeininger
in reply to: Daniel.Du

I'm not getting an error on that web method call.  I'm getting it on the UpdateFileAssociationReferences call.

Message 4 of 10
Daniel.Du
in reply to: NLeininger

Then same thing, try to remove ".ToArray()"



Daniel Du
Developer Technical Services
Autodesk Developer Network

Message 5 of 10
NLeininger
in reply to: Daniel.Du

I removed the .ToArray() and I'm still getting the same error.

 

CPP2.jpg

cpp3.jpg

Message 6 of 10
minkd
in reply to: NLeininger

You aren't passing the final parameter (associations) correctly. The associations must be passed as an array of arrays. -Dave


Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 7 of 10
NLeininger
in reply to: minkd

I'm now getting error code '0'.

 

cpp4.jpg

Message 8 of 10
minkd
in reply to: NLeininger

I'm finding it very difficult to to read the code in your screen shot.  Is there some reason you are posting images instead of text?

 

What call is throwing exception 0?

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.
Message 9 of 10
NLeininger
in reply to: minkd

Formatting is much easier in the screen shots.  You can right click on the image to increase the size.

 

The same method is throwing the error, UpdateFileAssociationReferences.

Message 10 of 10
minkd
in reply to: NLeininger

Can you check the vlog to get more detail about the error?

 

Make sure that the 3 arrays you are passing to DocumentService.UpdateFileAssociationReferences have the same outer dimension.

 

-Dave



Dave Mink
Fusion Lifecycle
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report