Layer Service
Class full path: NemAll_Python_BaseElements.LayerService
Functions
GetIDByShortName(shortName, doc)
staticmethod
Get the ID by the short name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shortName
|
str
|
Short name of the layer |
required |
doc
|
DocumentAdapter
|
Document |
required |
Returns:
Type | Description |
---|---|
int
|
ID by name |
GetNameByID(layerID, documentID)
staticmethod
Get the name by the ID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layerID
|
int
|
Layer ID |
required |
documentID
|
int
|
Document ID |
required |
Returns:
Type | Description |
---|---|
str
|
Name by ID |
GetShortNameByID(layerID, documentID)
staticmethod
Get the short name by the ID
Parameters:
Name | Type | Description | Default |
---|---|---|---|
layerID
|
int
|
Layer ID |
required |
documentID
|
int
|
Document ID |
required |
Returns:
Type | Description |
---|---|
str
|
Name by ID |
LoadFromFavoriteFile(doc, fileName)
staticmethod
Load the layer data from a favorite file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
fileName
|
str
|
File name |
required |
Returns:
Type | Description |
---|---|
bool
|
Data are loaded: true/false |
SaveToFavoriteFile(doc, fileName)
staticmethod
Save the layer data to a favorite file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc
|
DocumentAdapter
|
Document |
required |
fileName
|
str
|
File name |
required |
Returns:
Type | Description |
---|---|
bool
|
Data are saved: true/false |