Interface ILayers
Gives access to parameter entities.
Namespace: TopSolid.Kernel.Automating
Assembly: cs.temp.dll.dll
Syntax
[AvailableSinceVersion(7, 18, 0, 0)]
public interface ILayers
Remarks
This interface is available since v7.18.
Methods
CreateLayer(DocumentId, String, Int32)
Creates a real parameter entity in a document.
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
ElementId CreateLayer(DocumentId inDocumentId, string inName, int inNumber = 0)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the document to modify. |
System.String | inName | Name of the layer. |
System.Int32 | inNumber | Index of the layer. |
Returns
Type | Description |
---|---|
ElementId | Identifier of the created parameter entity. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.18.
GetLayer(DocumentId, ElementId)
Retrieves layer from an element. Returns Empty if no layer defined.
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
ElementId GetLayer(DocumentId inDocumentId, ElementId inElementId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the document. |
ElementId | inElementId | Identifier of the element. |
Returns
Type | Description |
---|---|
ElementId | Identifier of the Layer. |
GetLayers(DocumentId)
Gets the parameters entities that are in the parameters folder of a document.
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
List<ElementId> GetLayers(DocumentId inDocumentId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the document to analyze. |
Returns
Type | Description |
---|---|
List<ElementId> | Parameters entities found. |
Remarks
This method is available since v7.18.
Examples
List<ElementId>= TopSolidHost.Layers.GetLayers(currentDocument);
GetLayersFolder(DocumentId)
Gets the parameters folder entity of a document.
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
ElementId GetLayersFolder(DocumentId inDocumentId)
Parameters
Type | Name | Description |
---|---|---|
DocumentId | inDocumentId | Identifier of the document to analyze. |
Returns
Type | Description |
---|---|
ElementId | Identifier of the parameters folder entity found. |
Remarks
This method is available since v7.18.
IsLayer(ElementId)
Tells whether an Element is a layer.
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
bool IsLayer(ElementId inElementId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inElementId | Identifier of the Element to analyze. |
Returns
Type | Description |
---|---|
System.Boolean | true if element is actually a layer |
Remarks
This method is available since v7.18.
IsLayerFolder(ElementId)
Tells whether an Element is a layer folder.
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
bool IsLayerFolder(ElementId inElementId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inElementId | Identifier of the Element to analyze. |
Returns
Type | Description |
---|---|
System.Boolean | true if element is actually a layer folder |
Remarks
This method is available since v7.18.
IsShowable(ElementId)
Tells whether a parameter has a value.
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
bool IsShowable(ElementId inElementId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inElementId | Identifier of the parameter to analyze. |
Returns
Type | Description |
---|---|
System.Boolean | The parameter has a value. |
Remarks
This method is available since v7.18.
SetLayer(ElementId, ElementId)
Sets the Layer of a document
Declaration
[AvailableSinceVersion(7, 18, 0, 0)]
void SetLayer(ElementId inElementId, ElementId inLayerId)
Parameters
Type | Name | Description |
---|---|---|
ElementId | inElementId | Identifier of the element. |
ElementId | inLayerId | Identifier of the layer. |
Remarks
StartModification(String, Boolean) and EnsureIsDirty(ref DocumentId) must be called before calling this method.
This method is available since v7.18.