- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Everyone,
Hitting an issue with accessing the Component, hopefully, it's because I am missing something 🙂
I have some attributes added to a component, I used FusionTagger as a mean to debug this feature, and indeed there is an attribute on my component.
but when I am going through all components in the design, I can't seem to be able to ask for the .Attributes, I always get the error:
if component.Attributes: File "/Applications/Fusion360.app/Contents/Api/Python/packages/adsk/fusion.py", line 16086, in <lambda> __getattr__ = lambda self, name: _swig_getattr(self, Occurrence, name) File "/Applications/Fusion360.app/Contents/Api/Python/packages/adsk/fusion.py", line 57, in _swig_getattr raise AttributeError(name) AttributeError: Attributes
so my questions are:
- how can I check if Attributes are present on a given Component
- How can I iterate over all attributes of a Given Component.
All examples I see are about finding attributes within the design, that's not what I am after ( I am dumping all components into an Xml file for an export tool workflow to Unity). I am after the ability to use this Component.Attributes on a per Component base.
Here's the doc for this property
what I am noticing here, is that the doc seems to be wrong, as it mentions "faces", but we are in the Component class...
Description Returns the collection of attributes associated with this face.
also, here's the output of FusionTagger to show that there is indeed an attribute on my component "My First Part :2"
could it be that I am confused with occurences and component, I haven't fully understand that distinction yet, but then why would the api doc mention this .Attributes property for a Component class?
Thanks for your help!
Jean
Solved! Go to Solution.