DrawingTypeService
Canonical path: NemAll_Python_BaseElements.DrawingTypeService
Utility for processing the drawing type.
This class provides methods for processing the settings regarding drawing types, such as changing the current drawing type or getting the drawing type description based on the ID
Classes:
-
DefaultDrawingTypes
–Definition of the default drawing types
Methods:
-
GetCurrentDrawingTypeDescription
–Get the description of the current drawing type
-
GetCurrentDrawingTypeId
–Get the current drawing type ID
-
GetDrawingTypeDescription
–Get the description of the drawing type
-
GetDrawingTypeDescriptions
–Get the description of the drawing types
-
GetDrawingTypeIdFromDescription
–Get the ID of the drawing type from the description
-
SetDrawingTypeId
–Set the drawing type ID
DefaultDrawingTypes
Canonical path: NemAll_Python_BaseElements.DrawingTypeService.DefaultDrawingTypes
Bases: Enum
Definition of the default drawing types
Methods:
-
__getitem__
–get the item for a key
__getitem__
__getitem__(key: str | int | float) -> DefaultDrawingTypes
get the item for a key
Parameters:
-
key
(str | int | float
) –value key
Returns:
-
DefaultDrawingTypes
–value for the key
GetCurrentDrawingTypeDescription
staticmethod
GetCurrentDrawingTypeDescription(doc: DocumentAdapter) -> str
Get the description of the current drawing type
Parameters:
-
doc
(DocumentAdapter
) –Document
Returns:
-
str
–Description of the current drawing type
GetCurrentDrawingTypeId
staticmethod
GetCurrentDrawingTypeId(doc: DocumentAdapter) -> int
Get the current drawing type ID
Parameters:
-
doc
(DocumentAdapter
) –Document
Returns:
-
int
–Current drawing type ID
GetDrawingTypeDescription
staticmethod
GetDrawingTypeDescription(doc: DocumentAdapter, drawingTypeId: int) -> str
Get the description of the drawing type
Parameters:
-
doc
(DocumentAdapter
) –Document
-
drawingTypeId
(int
) –Drawing type ID
Returns:
-
str
–Description of the drawing type
GetDrawingTypeDescriptions
staticmethod
GetDrawingTypeDescriptions(doc: DocumentAdapter) -> VecStringList
Get the description of the drawing types
Parameters:
-
doc
(DocumentAdapter
) –Document
Returns:
-
VecStringList
–Drawing type desccriptions
GetDrawingTypeIdFromDescription
staticmethod
GetDrawingTypeIdFromDescription(
doc: DocumentAdapter, typeDescription: str
) -> int
Get the ID of the drawing type from the description
Parameters:
-
doc
(DocumentAdapter
) –Document
-
typeDescription
(str
) –Drawing type description
Returns:
-
int
–ID of the drawing type