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: 

How to change the Detail ID of a BOM item? and sth. about restrictions.

3 REPLIES 3
Reply
Message 1 of 4
smilinger
893 Views, 3 Replies

How to change the Detail ID of a BOM item? and sth. about restrictions.

  1. In the item BOM we can see the Detail ID property of the item occurrance. I know if we check in files from Inventor or AutoCAD Mechanical, the Detail ID will be automatically written into BOM. Is there any way we can change the Detail ID value through Vault API?
  2. Every item in our Vault has weight property, but the weight will not be written into title block in some AutoCAD drawings, and this is correct. Now the problem is, if we do "update item" after the drawing is modified, the weight property of item will also be cleared. So can we add a restriction that if the weight in the title block is empty, the weight property of item will not be updated?
  3. For an extension restriction, a message box will be prompted to inform the user what happened, which is done by Vault itself. If we do a bulk operation which will trigger this restriction many times, the message box will be prompted again and again, is there any way we can collect all these messages and display them in a single message box, like what Vault itself do like this:

       2011-11-11 17-52-22.png 

3 REPLIES 3
Message 2 of 4
Redmond.D
in reply to: smilinger

1.  There is no easy way to set the Detail ID through the API.  The intent is that Detail ID always comes from the CAD file.  The only way to change the value is to check out the CAD file, check it in with an updated BOM object, and update the item.  It's a complecated workflow, and I don't usually recommend it.

 

2. I wouldn't expect the "weight" to get cleared in the workflow you mentioned.  Is "weight" a mapped property?

 

3. There is nothing you can do in your restriction code.  However I would like to know more about the workflow.  What are the steps to reproduce?  Does the user have the option to exit mid-way through, or are they forced to click OK on each dialog?

 

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 4
smilinger
in reply to: Redmond.D

Thank you for your reply.

 

1. I think it's good for customer to update their Detail IDs only by update their CAD files when they use Inventor or AutoCAD Mechanical or such software else, but there are some customers using vanilla AutoCAD with no BOM information in their drawings at all, and using excel to import bom structures into vault. So there is no way to get Detail ID populated in vault from CAD files in such situation, let alone to change them, is that right?

 

2. yes, Weight is mapped from title block. so if we update item, the weight property will get the empty value from title block, and we don't want this happen.

 

3.the situation is we create a restriction that if user want to add a duplicated file into vault (same file for different project), the add action will be cancelled and a link will be created instead. When user drag a folder of files (there may be lots of duplicated file names) into vault, of course the restriction message box will show many times, user can select yes to continue or no to abort and if they want to continue, they will have to keep clicking yes.

Message 4 of 4
Redmond.D
in reply to: smilinger

1. Correct there is no way to set the Detail ID in this way.

 

2.  This goes back to the classic programming issue of what to do with empty data.  In some cases you want to set the property to blank and some cases where you want to ignore the property. 

Vault is coded to black the property.  There is no way to change this behavior.

Does the drawing's title block show the weight property with a blank value?

 

3.  This sort of thing happens with events.  The parent app isn't expecting this sort of thing to go wrong, so it doesn't collect up all the restrictions.  I'll log this case, but there are probably many more.

 

The event mechanism lets you restrict an opreation, but it wasn't intented to let you replace the operation with something else.  You might be better off just providing your own "copy folder" command to do the copy you want and leaving the restrictions in place for the decault copy command.

 



Doug Redmond
Software Engineer
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report