ArchComponent Namespace Reference

The base class of all Arch objects. More...

Classes

class  ArchSelectionObserver
 
class  Component
 
class  ComponentTaskPanel
 
class  IfcEditorDelegate
 
class  SelectionTaskPanel
 
class  ViewProviderComponent
 

Functions

def addToComponent (compobject, addobject, mod=None)
 
def removeFromComponent (compobject, subobject)
 

Detailed Description

The base class of all Arch objects.

This module provides the base Arch component class, that is shared by all of the Arch BIM objects

Function Documentation

◆ addToComponent()

def ArchComponent.addToComponent (   compobject,
  addobject,
  mod = None 
)
Add an object to a component's properties.

Does not run if the addobject already exists in the component's properties.
Adds the object to the first property found of Base, Group, or Hosts.

If mod is provided, adds the object to that property instead.

Parameters
----------
compobject: <ArchComponent.Component>
    The component object to add the object to.
addobject: <App::DocumentObject>
    The object to add to the component.
mod: str, optional
    The property to add the object to.

Referenced by ArchComponent.ComponentTaskPanel.addElement(), and ArchSectionPlane.SectionPlaneTaskPanel.addElement().

◆ removeFromComponent()

def ArchComponent.removeFromComponent (   compobject,
  subobject 
)
Remove the object from the given component.

Try to find the object in the component's properties. If found, remove the
object.

If the object is not found, add the object in the component's Subtractions
property.

Parameters
----------
compobject: <ArchComponent.Component>
    The component to remove the object from.
subobject: <App::DocumentObject>
    The object to remove from the component.

References ArchCommands.setAsSubcomponent().

Referenced by ArchComponent.ComponentTaskPanel.removeElement(), and ArchSectionPlane.SectionPlaneTaskPanel.removeElement().