[Solved] Easy use of linked datum plane

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
nm2107
Posts: 42
Joined: Sun Feb 20, 2022 10:37 pm

[Solved] Easy use of linked datum plane

Post by nm2107 »

Hello :)

I'm coming here to ask if there is a simpler / easier way to use a datum plane from another document in the current document (i.e. linked).
Let's say I have a document where I define a datum plane inside a body, which would represent the longitudinal axis of a fence. I defined this plane in a single document, and I'd be able to use it into multiple documents.

Code: Select all

FenceAxisPlane.FCStd
    - AxisBody
        - AxisDatumPlane

Code: Select all

FenceTopBar.FCStd
    - AxisBody (linked)
        -AxisDatumPlane
    - TopBarBody
I imported the AxisBody into another document, in order to draw the Fence TopBarBody simmetrically to the AxisDatumPlane. Unfortunately, I can't use the imported AxisDatumPlane directly to map a sketch on it (Broken link to support subelements error). As a workaround, I create a sub-object shape binder of the AxisDatumPlane, and I create a new DatumPlane placed on this binder (weird thing is that the binder doesn't appear to be oriented on the right axis, whereas the DatumPlane mapped to it is). Which leads to the following document structure :

Code: Select all

FenceTopBar.FCStd
    - AxisBody (linked)
        -AxisDatumPlane
    - TopBarBody
        - BinderAxisDatumPlane [binded to AxisDatumPlane from the linked AxisBody]
        - AxisDatumPlaneFromBinder [datum plane attached to the above Binder]
This is very cumbersome as every time I want to import such plane from an external file (i.e. link it), I have to create a sub-object binder to this plane and to attach a datum plane to this binder (i.e. doubles the tasks).

Hence my question, is there a simpler way to do so ? How to efficiently declare a plane into one document, and use it in other documents ?


Thank you for your help :)
Last edited by nm2107 on Wed Jun 14, 2023 7:21 pm, edited 1 time in total.
User avatar
nm2107
Posts: 42
Joined: Sun Feb 20, 2022 10:37 pm

Re: Easy use of linked datum plane

Post by nm2107 »

Bump :)

No ideas there ? How are you usually working with multiple documents ?
I'm not using any assembly WB, only linked documents and std::Parts (the yellow brick icon), and using the Part WB -> Attachment menu to place parts in space (usually with the "translate origin" option , to set the origin of a part to a sketch edge. So basically I draw a sketch to place the part in space).
Also, I rely a lot on spreadsheets with variables and use simple math operations to compute parts placement (i.e. additions, divisions, using widths, depts, offsets, etc... , and I rely on datum planes also). From what I've tried already, I figured out that FreeCAD is much more stable and efficient when using only these simple tools rather than using assemblies WB (also when the model is built considering the toponaming issue)

Here is an example of what I'm currently working on :
Screenshot from 2023-06-13 00-05-56.png
Screenshot from 2023-06-13 00-05-56.png (47.75 KiB) Viewed 2427 times
I'd be glad to know if you have some advices to speed up productivity with linked documents.

EDIT : I think I'll have to write a macro in order to speed up the import of a linked datum plane into the active body of the active document.
User avatar
nm2107
Posts: 42
Joined: Sun Feb 20, 2022 10:37 pm

Re: Easy use of linked datum plane

Post by nm2107 »

So I've written a macro to speed this import task up, here it is : https://github.com/nm2107/FreeCADMacroI ... ActiveBody

I can now import external datum planes into my active body via a single step :)

EDIT : the macro has been moved here : https://github.com/nm2107/FreeCADMacroI ... ActiveBody
User avatar
nm2107
Posts: 42
Joined: Sun Feb 20, 2022 10:37 pm

Re: [Solved] Easy use of linked datum plane

Post by nm2107 »

I updated my previous post as I merged the macro with another one into a new repository. The new macro is about easing the import of objects (e.g. datum planes and other objects) into the active body of the document.

Meanwhile, I've also written an other macro to speed up the import of a spreadsheet containing variables for a project : https://github.com/nm2107/FreeCADMacroImportGlobalVars . I usually have many .FCStd files opened when working on a single project, and manually importing (i.e. making a link to) the spreadsheet can be long when many files are opened.

Edit : the repo has moved here : https://github.com/nm2107/FreeCADModImportGlobalVars

Do you guys have a specific workflow when dealing with such variables spreadsheets ?
User avatar
nm2107
Posts: 42
Joined: Sun Feb 20, 2022 10:37 pm

Re: [Solved] Easy use of linked datum plane

Post by nm2107 »

For the record, I also have a macro to speed up the DXF export process, which automates the task I was manually doing with the TechDraw WB : https://github.com/nm2107/FreeCADMacroE ... ctionToDxf .

Again, if you have some productivity enhancement advices for FreeCAD usage, or if you have some workflow descriptions or videos, I'd be glad to know.

Thanks !
Post Reply