The Component module

PR 31355 Parametrics can access the registered component classes and the class description names. See help(Component.RegisteredClasses) and help(Component.RegisteredClassDescription) for more information. (v2015)

PR 33714 In parametrics, added a new callback for material events that should generally not turn the plugin graphical. See Component.OnMaterialNonGraphicalEvent for more details. (v2015)

PR 36524 Component.Erase now erases all of the components in a list.

PR 36074 In the python Component module, fixed ReplaceLiveComponentsWithCopy to work with multiple components. (v2016)

PR 42171 For component developers, previously components could opt out of being copyable by overriding Component.CanBeCopiededToOtherMembers and that would apply to component copy, component move, and member copy. Now components can be more fine grained when they will permit copy/move. CanBeMovedToOtherMembers applies to component move and will default. CanBeMovedWithMember applies to member copy. For backward compatibility both are defaulted to CanBeCopiedToOtherMembers. (v2017)

PR 43703 In the Python API, a component's member number is now set during the EditBeforeAddingToMember call back. (v2017)

PR 44871 In the Python API fixed a bug in Component.ReplaceLiveComponentsWithCopy that prevented components from being saved. (v2018.09)

PR 45178 In the Python API, non-navigation tools will be disabled during Layout3D .get_Layout3D and the default Component.Component.SetReferencePointForMemberUI() implementation. (v2018)

To get help on the Component module, you can use the built-in Python functions dir() and help() .

SDS2 Python Prompt

>>> import Component                               # import the module
>>>
>>> dir(Component)                                    # do a dir() on the module name
['AddPairsOfComponentsToMember', 'Component', 'CopyPairsOfComponentsToMember', 'Deselect', 'Erase', 'ExplodeComponent', 'GetComponentsOnMember', 'GetLockedAndRefreshed', 'GetRegisteredClasses', 'GetSelectedComponents', 'LocateMultiple', 'LocateSingle', 'LockModifies', 'PrepareComponentForMember', 'ReferencePointInGlobal', 'RegisterComponentType', 'RegisteredClassDescription', 'ReplaceLiveComponentsWithCopy', 'Select', '__GetLiveComponentsOnMember', '__GetLiveSelectedComponents', '__doc__', '__name__', '__package__']
>>> help(Component.Component)             # use help()
Help on class Component in module Component:

class Component(Boost.Python.instance)
| Components provide a way to extend the functionality of members using the
| Parametric API in a dynamic way that can't be recreated with a normal
| parametric.
|
| For example ...

# use the python prompt to see the reset of this documentation

page 1 | contents | modules | top