-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basename of the Unfolded objects #350
Comments
Sounds like a good idea. |
Nice, thanks. I tried to improve this here #352. What do you think? |
The proposal works as you can see in the screenshot below. I just noticed an interesting thing. However when I repeat the unfolding of the same object. What do you think? |
Ah nevermind, this looks like a bug on the latest dev. |
of object names are not unique anymore how can you tell them apart? |
hm did not know, I got the first parent from the Parents list and on my test, it worked. maybe I got lucky. |
Actually all partents are the same, maybe... Gui.Selection.addSelection('Unnamed','Body001','Bend001.')
>>> ### Begin command Std_SendToPythonConsole
>>> # try:
>>> # del(doc,lnk,obj,shp,sub,subs)
>>> # except Exception:
>>> # pass
>>> #
>>> # doc = App.getDocument("Unnamed")
>>> # obj = doc.getObject("Bend001")
>>> # shp = obj.Shape
>>> ### End command Std_SendToPythonConsole
>>> obj.Label
'Bend001'
>>> obj.Parents
[(<body object>, 'Bend001.'), (<body object>, 'Bend001.')]
>>> obj.Parents[0][1]
'Bend001.'
>>> obj.Parents[0][0].Name
'Body001'
>>> obj.Parents[0][0].Label # <======== Label of the First parent
'my_Body'
>>> obj.Parents[1][0].Label # <======== Label of the Second parent
'my_Body'
>>>
```python |
I dont think it has to do with object parents. It should be done based on the selected object before the fold. |
it can happen too. |
the feature is inside a body, the selected body is the same. |
can I select multiple bodies to unfold at the same time? |
no |
The way I implemented works fine. |
Hi @shaise , I would like to suggest to use the base Body name (actually Label) as the basename of the unfolded objects.
For instance, the object name is
Bottom
Then if I unfold it, it could generate the
Bottom_Unfolded
and theBottom_Unfolded_Sketch
The text was updated successfully, but these errors were encountered: