easyw-fc wrote: ↑Fri May 04, 2018 9:38 am
1) after starting FC, if I open a '.py' file, the 'execute macro' button is not enabled and I get the following error:
Noted, and thanks for reporting. I will fix it soon.
2) the 'Visibility' property for an element inside an Assembly Parts container is always 'False'
I noticed that this can be changed with 'Gui.Selection.setVisible()' but I don't know how to get the value through a python command
This is by design. 'Visiblity' is used by the object to control its own visibility in the global coordinate space. And in the case of App::Part container, the object no longer exists in the global space, so it controls its local coordinate visibility. I don't like that behavior. I want an object to be able to appear in the global and possibility multiple local coordinate system at the same time with independent visibility control. My 'Link' has a group mode that support this with the isElementVisible/setElementVisible() methods. These are core APIs exists in every document object. For those container that supports child visibility control, they will return 1 as visible and 0 as invisible when calling isElementVisible(childName). Those don't will return -1 instead. The 'Visiblity' property is still used to control object's visibility in global coordinate system. However, since the Element object is not meant to be shown outside of an assembly container, I made its 'Visibility' property as read only in Python.
BTW, every property of every object now has dynamic access control using get/setPropertyStatus() function. Very much like the file permission in operating system, the user can choose to override the setting if he knows what he is doing. To remove read only of a property, you can call obj.setPropertyStatus(propName, '-Immutable'). To set readonly, call obj.setPropertyStatus(propName,'Immutable'). Call obj.getPropertyStatus(propName) to get the current access control. Call obj.getPropertyStatus(), i.e. without property name, to obtain all supported access control status name. Note the 'ReadOnly' status controls the property editor read-only-ness, while the 'Immutable' controls the Python access, for backward compatibility reason. The property access control status is persistent. Also, C++ code is able to set permanent access control which cannot be overridden.
5) are Boolean operation available for Links? Is that an useful option or it is not suggested to be enabled?
I am not sure I understand this question. Do you want to use Link as a tool or base in some Part boolean operation? You can already do this with the version you have. There is even a command to replace an existing tool or base of a Part feature with a Link. Simply switch to Part workbench, right click a object you want to replace in the tree view, and select 'Link actions -> Replace with a link'. To revert, use 'Link actions -> Unlink'.
Thx a lot for this amazing new Assembly
And I want to thank you for testing. You're probably the first one to try development using my branch.
PS. I have just added Part shape copy with color you asked for, although you'll need to wait for the next release to be able to test it. After assigning the Part::Feature with a shape from another object, call the Part::Feature's view object's new method mapShapeColors(doc). The 'doc' is the owner document of the object the shape comes from. In case the object comes from the same document, you can omit that. If not, then this argument enables retrieving color from the external object. I enhanced Part simple copy with this new method. Also added Transformed copy (copy that respects local coordinates) and Element copy (Face, Edge, Vertex copy). The copy command supports any objects with or without shape (such as Assembly container, and App::Part), either in the same or from external document.