Interface ISubstitutions
Gives access to assemblies.
Namespace: TopSolid.Cad.Design.Automating
Assembly: TopSolid.Cad.Design.Automating.dll
Syntax
[ServiceContract]
[AvailableSinceVersion(7, 19, 0, 0)]
public interface ISubstitutions
Remarks
This interface is available since v7.19.
Methods
ClearGlobalSubstitutions(ElementId)
Clears global substitutions (rules excepted)
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
void ClearGlobalSubstitutions(ElementId inOperationId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the operation holding substitutions. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.19.
ClearLocalSubstitutions(ElementId)
Clears local substitutions (rules excepted)
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
void ClearLocalSubstitutions(ElementId inOperationId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the operation holding substitutions. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.19.
ExcludeLocalComponent(ElementId, ElementId)
Exclude a sub component from substitution
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
void ExcludeLocalComponent(ElementId inOperationId, ElementId inElementId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the top inclusion operation holding sub-component to substitute. |
ElementId | inElementId | Identifier of the element to exclude from substitution. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.19.
GetCodeAndDriversFromSubstitutableElement(ElementId, ElementId, out String, out List<String>, out List<SmartObject>, out List<String>, out List<SmartDesignObject>)
Get code and drivers from a substitutable Element
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
void GetCodeAndDriversFromSubstitutableElement(ElementId inOperationId, ElementId inElementId, out string outCode, out List<string> outKernelDriverNames, out List<SmartObject> outKernelDriverValues, out List<string> outDesignDriverNames, out List<SmartDesignObject> outDesignDriverValues)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the top inclusion operation holding sub-component to substitute. |
ElementId | inElementId | Identifier of the substitutable element. |
System.String | outCode | Instance code, or null if none. |
System.Collections.Generic.List<System.String> | outKernelDriverNames | Instance kernel driver names, or null if none. |
System.Collections.Generic.List<SmartObject> | outKernelDriverValues | Instance kernel driver values, or null if none. |
System.Collections.Generic.List<System.String> | outDesignDriverNames | Instance design driver names, or null if none. |
System.Collections.Generic.List<SmartDesignObject> | outDesignDriverValues | Instance design driver values, or null if none. |
Remarks
This method is available since v7.19.
GetCurrentSubstitutionRule(ElementId)
Gets current substitution rule
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
ElementId GetCurrentSubstitutionRule(ElementId inOperationId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the operation holding substitutions. |
Returns
Type | Description |
---|---|
ElementId | The substitution rules. |
Remarks
This method is available since v7.19.
GetSimilarFamilyDocuments(ElementId)
Gets the same fonctions family documents from a substitutable element.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
List<PdmMinorRevisionId> GetSimilarFamilyDocuments(ElementId inElementId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inElementId | Identifier of the substitutable element to analyze. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<PdmMinorRevisionId> | Compatible family documents found as PdmMinorRevisionId list. |
Remarks
This method is available since v7.19.
GetSubstitutableElements(ElementId)
Gets the sub-components substitutable elements from a top inclusion operation.
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
List<ElementId> GetSubstitutableElements(ElementId inOperationId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the parent inclusion operation to analyze. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<ElementId> | Part or assembly entities found. |
Remarks
This method is available since v7.19.
SetSubstitutionRules(ElementId, ElementId)
Sets current substitution rules to use with the the inclusion operation
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
void SetSubstitutionRules(ElementId inOperationId, ElementId inElementId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the operation holding substitutions. |
ElementId | inElementId | Identifier of the substitution rules to use. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.19.
SubstituteGlobalComponent(ElementId, ElementId, DocumentId, String, List<String>, List<SmartObject>)
Substitue all sub components by a compatible family
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
void SubstituteGlobalComponent(ElementId inOperationId, ElementId inElementId, DocumentId inFamilyDocumentId, string inCode, List<string> inKernelDriverNames, List<SmartObject> inKernelDriverValues)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the top inclusion operation holding sub-component to substitute. |
ElementId | inElementId | Identifier of the element to substitute. |
DocumentId | inFamilyDocumentId | Identifier of the family Document to use for substitution (same family if needed) |
System.String | inCode | Instance code, or null if none. |
System.Collections.Generic.List<System.String> | inKernelDriverNames | Instance kernel driver names, or null if none. |
System.Collections.Generic.List<SmartObject> | inKernelDriverValues | Instance kernel driver values, or null if none. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.19.
SubstituteLocalComponent(ElementId, ElementId, DocumentId, String, List<String>, List<SmartObject>)
Substitue a sub component by a compatible family
Declaration
[OperationContract]
[AvailableSinceVersion(7, 19, 0, 0)]
void SubstituteLocalComponent(ElementId inOperationId, ElementId inElementId, DocumentId inFamilyDocumentId, string inCode, List<string> inKernelDriverNames, List<SmartObject> inKernelDriverValues)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inOperationId | Identifier of the top inclusion operation holding sub-component to substitute. |
ElementId | inElementId | Identifier of the element to substitute. |
DocumentId | inFamilyDocumentId | Identifier of the family Document to use for substitution (same family if needed) |
System.String | inCode | Instance code, or null if none. |
System.Collections.Generic.List<System.String> | inKernelDriverNames | Instance kernel driver names, or null if none. |
System.Collections.Generic.List<SmartObject> | inKernelDriverValues | Instance kernel driver values, or null if none. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.19.