def write(self, tagwriter: 'TagWriter'): # BLOCK section: do not write content of model space and active layout if self.name.upper() in ('*MODEL_SPACE', '*PAPER_SPACE'): save = self._entity_space self._entity_space = EntitySpace(self.entitydb) super(BlockLayout, self).write(tagwriter) self._entity_space = save else: super(BlockLayout, self).write(tagwriter)
def __init__(self, entities, drawing: 'Drawing'): entity_space = EntitySpace(drawing.entitydb) super(ObjectsSection, self).__init__(entity_space, entities, drawing)
def __init__(self, entitydb, dxffactory, block_handle, endblk_handle): super(DXF12BlockLayout, self).__init__(dxffactory, EntitySpace(entitydb)) self._block_handle = block_handle self._endblk_handle = endblk_handle
def setUp(self): self.dwg = DrawingProxy('AC1009') self.space = EntitySpace(self.dwg.entitydb)
def active_layout_entities(self): # required for the drawing setup process es = EntitySpace(self.entitydb) es.extend(self._filter_entities(paper_space=1)) return es
def model_space_entities(self): # required for the drawing setup process es = EntitySpace(self.entitydb) es.extend(self._filter_entities(paper_space=0)) return es
def __init__(self, tags, drawing): super(EntitySection, self).__init__(EntitySpace(drawing.entitydb), tags, drawing)
def __init__(self, entitydb: 'EntityDB', dxffactory: 'DXFFactoryType', block_handle: str, endblk_handle: str): super(DXF12BlockLayout, self).__init__(dxffactory, EntitySpace(entitydb)) self._block_handle = block_handle self._endblk_handle = endblk_handle
def __init__(self, entities: Iterable['ExtendedTags'], drawing: 'Drawing'): super().__init__(EntitySpace(drawing.entitydb), entities, drawing)
def space(): return EntitySpace(EntityDB())