-
Notifications
You must be signed in to change notification settings - Fork 3
2017 API dlibrary.object.DrawnObject
You can use this wrapper for objects that aren't yet in this library. As the object repository will not always know all possible object types, due to the fact that we are still working on DLibrary, and that Vectorworks can introduce new types, this class can be used for it's general properties.
__init__(self, handle_or_name: 'vs.Handle | str')
- (get) attributes
-
(get) bb_bottom
->
float -
(get) bb_height
->
float -
(get) bb_left
->
float -
(get) bb_right
->
float -
(get) bb_top
->
float -
(get) bb_width
->
float -
(get/set) clazz
->
dlibrary.document.Clazz -
(get/set) fill
->
'PatternFillEnum | T <= AbstractVectorFill' -
(get) handle
->
vs.Handle -
(get) layer
->
dlibrary.document.Layer - (get/set) line -- ":rtype: PatternFillEnum | T <= AbstractVectorLine
-
(get) name
->
str -
(get) records
->
'dict[str, Record]'
__eq__(self, other)
Two objects are the same if they are from the same type and both have the same handle. The handle is what Vectorworks sees as the primary key for an object (which is session based!)
__hash__(self)
We need to override this, as we have custom object equality implemented! The Handle class isn't hashable, so we'll use the string representation instead.
__ne__(self, other)
move(self, delta_x: float, delta_y: float)
move_backward(self, count: int=1)
move_forward(self, count: int=1)
move_to_back(self)
move_to_front(self)
reset(self)
rotate(self, angle: float, origin: '(float, float)'=None)
Will rotate the object around it's own center point, relative to the drawing, not the plug-in!