Method SetStockManagement2
SetStockManagement2(DocumentId, StockManagementType, DocumentId, ElementId, SmartText, SmartText, SmartText, SmartText, SmartText)
Sets the stock management of a part or assembly.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 11, 0, 0)]
void SetStockManagement2(DocumentId inDocumentId, StockManagementType inType, DocumentId inStockDocumentId, ElementId inStockOccurrenceId, SmartText inStockName, SmartText inStockDescription, SmartText inStockPartNumber, SmartText inStockMajorRevision, SmartText inStockDimensions)
Parameters
| Type | Name | Description |
|---|---|---|
| DocumentId | inDocumentId | Identifier of part or assembly document to modify. |
| StockManagementType | inType | Type of management. |
| DocumentId | inStockDocumentId | Stock document identifier, or empty if not of type Document. |
| ElementId | inStockOccurrenceId | Stock occurrence identifier, or empty if not of type Occurrence. |
| SmartText | inStockName | Stock name, or null if not of type Manual. |
| SmartText | inStockDescription | Stock description, or null if not of type Manual. |
| SmartText | inStockPartNumber | Stock part number, or null if not of type Manual. |
| SmartText | inStockMajorRevision | Stock major revision, or null if not of type Manual. |
| SmartText | inStockDimensions | Stock dimensions, or null if not of type Manual. |
Remarks
StartModification(string, bool) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.11.