Python 3.x: 'Components' property of a Two-Way Path

Hi all,

I’m trying to become more experienced with the Python 3 API. If I understand it correctly, the vcContainer class (which the vcTwoWayMotionPath inherits from via its parent, vcMotionPath) has a ‘Components’ property to indicate all items present on the path. However, path.Properties["Components"] always returns ‘None’, indicating I likely have the wrong property. On the other side, path.Properties["ComponentCount"] does return the actual component count.

Therefore, my question is: How can I get a list of vcComponents currently on my path via the Python 3 API?

Thank you in advance,

~B.

It’s simply “path.Components”:

  • Stuff in this section of the documentation are “python properties” similarly to what is demonstrated in Python property() function - GeeksforGeeks, e.g. attributes that can be get/set/get and set depending on how they were defined
  • Stuff inside “Properties” (=the property container) are vcProperty objects that have Value attribute for getting and setting the value, and the data type must be among the supported property types of VC API.
1 Like

Thanks for the clarification, that helps a lot!