Interface IBoms
Gives access to bill of materials (BOMs).
Namespace: TopSolid.Cad.Design.Automating
Assembly: TopSolid.Cad.Design.Automating.dll
Syntax
[ServiceContract]
[AvailableSinceVersion(7, 12, 0, 0)]
public interface IBoms
Remarks
This interface is available since v7.6.
Methods
ActivateRow(DocumentId, Int32)
Activates a row of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void ActivateRow(DocumentId inDocumentId, int inRowId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
System.Int32 | inRowId | Identifier of the row to activate. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.
DeactivateRow(DocumentId, Int32)
Deactivates a row of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void DeactivateRow(DocumentId inDocumentId, int inRowId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
System.Int32 | inRowId | Identifier of the row to deactivate. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.
ForceCell(DocumentId, Int32, Int32, Property)
Forces the property value of a cell of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void ForceCell(DocumentId inDocumentId, int inRowId, int inColumnIx, Property inForcedProperty)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
System.Int32 | inRowId | Identifier of the row of the cell to modify. |
System.Int32 | inColumnIx | Index of the column of the cell to modify, within [0,GetColumnCount(DocumentId)-1]. |
Property | inForcedProperty | Forced property of the cell. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.
ForceColumnTitle(DocumentId, Int32, String)
Forces the title of a column of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void ForceColumnTitle(DocumentId inDocumentId, int inColumnIx, string inTitle)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
System.Int32 | inColumnIx | Index of the column to modify, within [0,GetColumnCount(DocumentId)-1]. |
System.String | inTitle | New forced title. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.
GetColumnCount(DocumentId)
Gets the number of columns of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
int GetColumnCount(DocumentId inDocumentId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
Returns
Type | Description |
---|---|
System.Int32 | Number of columns. |
Remarks
This method is available since v7.12.
GetColumnPropertyDefinition(DocumentId, Int32)
Gets the property definition of a column of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
PropertyDefinition GetColumnPropertyDefinition(DocumentId inDocumentId, int inColumnIx)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inColumnIx | Index of the column to analyze, within [0,GetColumnCount(DocumentId)-1]. |
Returns
Type | Description |
---|---|
PropertyDefinition | Property definition of the column. |
Remarks
This method is available since v7.12.
GetColumnTitle(DocumentId, Int32)
Gets the title of a column of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
string GetColumnTitle(DocumentId inDocumentId, int inColumnIx)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inColumnIx | Index of the column to analyze, within [0,GetColumnCount(DocumentId)-1]. |
Returns
Type | Description |
---|---|
System.String | Title of the column. |
Remarks
This method is available since v7.12.
GetForcedCells(DocumentId, out List<Int32>, out List<Int32>)
Gets the cells of a BOM which property value has been forced.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void GetForcedCells(DocumentId inDocumentId, out List<int> inRowIds, out List<int> inColumnIxs)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Collections.Generic.List<System.Int32> | inRowIds | Row identifiers of cells. |
System.Collections.Generic.List<System.Int32> | inColumnIxs | Column indexes of cells. |
Remarks
If there is not any forced cell, the returned lists are empty.
This method is available since v7.12.
GetPropertyDefinitions()
Gets the available property definitions that may be used in a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
List<PropertyDefinition> GetPropertyDefinitions()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<PropertyDefinition> | Property definitions that may be used in a BOM document. |
Remarks
The special BOM property definitions defined in BomPropertyDefinitions are not included in the returned list.
This method is available since v7.12.
GetRootRow(DocumentId)
Gets the identifier of the root row of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
int GetRootRow(DocumentId inDocumentId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
Returns
Type | Description |
---|---|
System.Int32 | Identifier of the root row, or |
Remarks
This method is available since v7.12.
GetRowChildrenRows(DocumentId, Int32)
Gets the children rows of a row of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
List<int> GetRowChildrenRows(DocumentId inDocumentId, int inRowId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inRowId | Identifier of the row to analyze. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.Int32> | Identifiers of the children rows, or empty if none. |
Remarks
This method is available since v7.12.
GetRowContents(DocumentId, Int32, out List<Property>, out List<String>)
Gets the contents of a row of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void GetRowContents(DocumentId inDocumentId, int inRowId, out List<Property> outProperties, out List<string> outTexts)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inRowId | Identifier of the row to analyze. |
System.Collections.Generic.List<Property> | outProperties | Properties corresponding to the columns. |
System.Collections.Generic.List<System.String> | outTexts | Texts displayed in the columns. |
Remarks
Both returned lists contain GetColumnCount(DocumentId) objects.
Properties that are not specified (empty cells), or not convertible to Automation properties, are returned as null
in the list.
This method is available since v7.12.
GetRowCountedEntities(DocumentId, Int32)
Gets the entities that are counted in a row of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
List<ElementId> GetRowCountedEntities(DocumentId inDocumentId, int inRowId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inRowId | Identifier of the row to analyze. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ElementId> | Counted entities. |
Remarks
This method is available since v7.12.
GetSourceRepresentation(DocumentId)
Gets the source representation of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
ElementId GetSourceRepresentation(DocumentId inDocumentId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
Returns
Type | Description |
---|---|
ElementId | Identifier of the representation of the source assembly document, or Empty if none. |
Remarks
This method is available since v7.12.
GetSourceSets(DocumentId)
Gets the source sets of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
List<ElementId> GetSourceSets(DocumentId inDocumentId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ElementId> | Identifiers of the sets of the source assembly document, or empty if none. |
Remarks
This method is available since v7.12.
IsBom(DocumentId)
Tells whether a document is a BOM document.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
bool IsBom(DocumentId inDocumentId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the document to analyze. |
Returns
Type | Description |
---|---|
System.Boolean | The document is a BOM document. |
Remarks
This method is available since v7.12.
IsCellForced(DocumentId, Int32, Int32)
Tells whether the property value of a cell of a BOM has been forced.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
bool IsCellForced(DocumentId inDocumentId, int inRowId, int inColumnIx)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inRowId | Identifier of the row of the cell to analyze. |
System.Int32 | inColumnIx | Index of the column of the cell to analyze, within [0,GetColumnCount(DocumentId)-1]. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the property value of the cell has been forced. |
Remarks
This method is available since v7.12.
IsColumnTitleForced(DocumentId, Int32)
Tells whether the title of a column of a BOM is forced.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
bool IsColumnTitleForced(DocumentId inDocumentId, int inColumnIx)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inColumnIx | Index of the column to analyze, within [0,GetColumnCount(DocumentId)-1]. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the title of the column is forced. |
Remarks
This method is available since v7.12.
IsColumnVisible(DocumentId, Int32)
Tells whether a column of a BOM is visible.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
bool IsColumnVisible(DocumentId inDocumentId, int inColumnIx)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inColumnIx | Index of the column to analyze, within [0,GetColumnCount(DocumentId)-1]. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the column is visible. |
Remarks
This method is available since v7.12.
IsRowActive(DocumentId, Int32)
Tells whether a row of a BOM is active.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
bool IsRowActive(DocumentId inDocumentId, int inRowId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to analyze. |
System.Int32 | inRowId | Identifier of the row to analyze. |
Returns
Type | Description |
---|---|
System.Boolean | Whether the row is active. |
Remarks
This method is available since v7.12.
SetSourceRepresentation(DocumentId, ElementId)
Sets the source representation of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void SetSourceRepresentation(DocumentId inDocumentId, ElementId inRepresentationId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
ElementId | inRepresentationId | Identifier of the representation of the source assembly document. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.
SetSourceSets(DocumentId, List<ElementId>)
Sets the source sets of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void SetSourceSets(DocumentId inDocumentId, List<ElementId> inSetIds)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
System.Collections.Generic.List<ElementId> | inSetIds | Identifiers of the sets of the source assembly document, or empty if none. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.
UnforceCell(DocumentId, Int32, Int32)
Unforces the property value of a cell of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void UnforceCell(DocumentId inDocumentId, int inRowId, int inColumnIx)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
System.Int32 | inRowId | Identifier of the row of the cell to modify. |
System.Int32 | inColumnIx | Index of the column of the cell to modify, within [0,GetColumnCount(DocumentId)-1]. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.
UnforceColumnTitle(DocumentId, Int32)
Unforces the title of a column of a BOM.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 12, 0, 0)]
void UnforceColumnTitle(DocumentId inDocumentId, int inColumnIx)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the BOM document to modify. |
System.Int32 | inColumnIx | Index of the column to modify, within [0,GetColumnCount(DocumentId)-1]. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.12.