cannot add a window from menu or parts lib

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!
65pony
Posts: 20
Joined: Mon Jul 20, 2020 7:49 pm

cannot add a window from menu or parts lib

Post by 65pony »

Hello:
I am trying to add a simple window from menu or parts library to a wall in freecad 0.19 but get an error, please see attached screen image. what am I doing wrong?
thanks
Attachments
screen.png
screen.png (554.88 KiB) Viewed 873 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: cannot add a window from menu or parts lib

Post by Roy_043 »

Please retest with version V0.20.
65pony
Posts: 20
Joined: Mon Jul 20, 2020 7:49 pm

Re: cannot add a window from menu or parts lib

Post by 65pony »

will do thanks
65pony
Posts: 20
Joined: Mon Jul 20, 2020 7:49 pm

Re: cannot add a window from menu or parts lib

Post by 65pony »

I did try both 0.19.4 and 0.20 but the same problem. further investigation I found out that the path is the issue in win10. here is the path that freecad takes:
FreeCADGui.ActiveDocument.mergeProject('C:\Users\xxxxxxx\AppData\Roaming\FreeCAD\Mod\parts_library\Architectural Parts\Doors\Metal\Slinding door 2 sheets with glass.FCStd')

the problem is the single backslash "\", it needs to be like so "\\". when I manually change all those in the python window, it takes the window and places it, with a different issue of not being able to "scale" it. no change in the height or width will register!!!

1. how do I change the path universally in FREECAD so that always take in two backslashes?
2. how do I scale the windows ?

I am not a pyhtom programmer, but good C/C++/C# programmer.
many thanks
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: cannot add a window from menu or parts lib

Post by Roy_043 »

The path issue was addressed during the V0.20 dev cycle. So I am very surprised by your findings. Are you sure that you have tested with the latest V.020? Also please provide proper version information (https://forum.freecadweb.org/viewtopic.php?f=3&t=2264).

For reference:
https://github.com/FreeCAD/FreeCAD/blob ... #L381-L387
https://github.com/FreeCAD/FreeCAD/pull/5485

Note that many of the windows and doors in the library are faulty. But when you insert them with V0.20 you should see one or more warnings.
See: https://forum.freecadweb.org/viewtopic. ... 10#p562248
65pony
Posts: 20
Joined: Mon Jul 20, 2020 7:49 pm

Re: cannot add a window from menu or parts lib

Post by 65pony »

thank you for the info and the links. I will look into them. I did try the version 0.20, with window 10. I tried both the BIM windows and the library parts slider doors the same issue. both also will not allow any scaling or changing their dimensions. I remember, I used to be bale to do it somehow, but no longer
thanks
Attachments
scr.png
scr.png (745.84 KiB) Viewed 662 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: cannot add a window from menu or parts lib

Post by Roy_043 »

I have just tested with the "Slinding door 2 sheets with glass.FCStd" file and I cannot reproduce the path error. But it is one of the faulty files that cannot be used in the current FreeCAD version.

I am attaching the current Git version of ArchWindow.py. Please compare it with the file in your installation.
Attachments
ArchWindow.py
(79.81 KiB) Downloaded 19 times
65pony
Posts: 20
Joined: Mon Jul 20, 2020 7:49 pm

Re: cannot add a window from menu or parts lib

Post by 65pony »

as per your recommendation, I finally got the window to install from parts library
version 0.20
window 10
however now, the window does not cut thru the wall, now can I adjust the dimensions. how do I do these functions?
thanks for the help
Attachments
sc.png
sc.png (680.66 KiB) Viewed 614 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: cannot add a window from menu or parts lib

Post by Roy_043 »

As already explained: many of the files in the library are faulty. You can check the files yourself by just opening them. Often they will not recompute. Also for resizing to work the window sketch must have a Height and a Width constraint. In many files these are missing.

The already linked to topic lists two files that do work:
https://forum.freecadweb.org/viewtopic. ... 10#p562248

To verify if the code works please test only with those two files.
65pony
Posts: 20
Joined: Mon Jul 20, 2020 7:49 pm

Re: cannot add a window from menu or parts lib

Post by 65pony »

hello:
as per your suggestions, I have tried the following
parts_library\Architectural Parts\Windows\Sash\Sash window.FCStd
parts_library\Architectural Parts\Windows\Fixed\Simple window fixed.FCStd

with no effect. both did not cut thru the wall nor could I change their dimensions! am I using an old library? is there a newer version of the libraries that are compatible with 0.19 and 0.20?
I am not a great python programmer, I have used it before in small capacity. can older library file be modified to work wit the newer version?
thanks again
Post Reply