Inventor C# api to set Inventor.Property.Value crashes Inventor for Assembly files in Vault workspace

Inventor C# api to set Inventor.Property.Value crashes Inventor for Assembly files in Vault workspace

Deepthi.Neeli
Contributor Contributor
176 Views
1 Reply
Message 1 of 2

Inventor C# api to set Inventor.Property.Value crashes Inventor for Assembly files in Vault workspace

Deepthi.Neeli
Contributor
Contributor

We have custom addin in C# that does a SaveAs on an Inventor assembly file and sets some properties on the new file. This is crashing Inventor when Inventor is connected to a Vault workspace.
Version of Vault and Inventor we use are:
Vault server: 2023.3
Vault client: 2023.3

Inventor version: 2023.3

This code works fine in Default Inventor workspace(no Vault) and also on ipt files in a Vault workspace. But crashes on iam files in a Vault workspace.
Document doc = invApplication.ActiveDocument
doc.SaveAs(newFilePath, false);
PropertySet designTrackingProperties = doc.PropertySets["Design Tracking Properties"];
Property propNumber = designTrackingProperties.get_ItemByPropId((int)PropertiesForDesignTrackingPropertiesEnum.kPartNumberDesignTrackingProperties);
propNumber .Value = "Test-PartNumber";

0 Likes
177 Views
1 Reply
Reply (1)
Message 2 of 2

jjstr8
Collaborator
Collaborator

I think this is a bug.  I tried a SaveAs (SaveCopyAs=false) on an assembly I had checked out from Vault.  The new assembly show checked out to me AND checked out to the old assembly (not a user!).  If I do the same on a checked-in file, it shows up as "Unknown status".  I think the workaround would be to SaveCopyAs=true and open the file to modify its iProperties.

0 Likes