Default drawing - empty.dxf

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Default drawing - empty.dxf

Jim Winkler
Two issues:
1) How do I edit LiberCAD's initial startup / "File/New" drawing? Editing empty.dxf does not make changes to it.
I edited and saved C:\Program Files (x86)\LibreCAD\resources\library\templates\empty.dxf  If I do a "File/New From Template" and load C:\Program Files (x86)\LibreCAD\resources\library\templates\empty.dxf, I get a drawing with my modifications. This included adding layers and setting paper to "letter" and margins to (0.2", 0.2", 0.2", 0.2") When I start LiberCAD, or do a "File/New" it loads the same file that it did when I installed LiberCAD. There is only layer 0 and the drawing paper size seems to vary between letter (with margins of 0,0,0,0) and custom with a very small size (width: 8.0399e-07, height: 1.0405e-06). How do I edit the default opening drawing?

BTW: Where is empty.dxf really located? If I delete C:\Program Files (x86)\LibreCAD\resources\library\templates\empty.dxf then do a "File/New From Template", there is still a C:\Program Files (x86)\LibreCAD\resources\library\templates\empty.dxf  If using File Explorer, I copy a file to C:\Program Files (x86)\LibreCAD\resources\library\templates\empty.dxf, the empty.dxf file I copied does not show up with file/open on LiberCAD. The old empty.dxf shows.

2) What is the difference between "File/Open" and "File/New From Template"? They both go to the same last directory a file was opened from. If I "File/Open" say C:\Users\Jim\Documents\Drawings\bracket.dxf then do a "File/New From Template", it will open to C:\Users\Jim\Documents\Drawings\ I have to change directories to C:\Program Files (x86)\LibreCAD\resources\library\templates\ If I then open, say, empty.dxf then a "File/Open", it will open C:\Program Files (x86)\LibreCAD\resources\library\templates\ It seems the two are linked. The New From Template should, I would think, at least initially open to the path set in Options/Application Preferences/Paths/Template:
Interestingly, doing a "File/New From Template" does not change the "File/Save As" directory, just the "File/Open" directory.

Thanks -Jim

Win 10 Pro 64
Version: 2.2.0-rc1-170-g8ef77b40
Compiler: GNU GCC 4.9.1
Compiled on: Mar  9 2020
Qt Version: 5.4.1
Boost Version: 1.53.0
System: Windows
Reply | Threaded
Open this post in threaded view
|

Re: Default drawing - empty.dxf

flywire
This post was updated on .
Can you try https://dokuwiki.librecad.org/doku.php/tutorial:simple_template? It might teach you how it works quickly. If not just add further queries to this thread which might help improve the tutorial anyway.

I rewrote the template section of the user guide a month ago - see rewrite at https://github.com/flywire/docs/blob/patch-2/guides/drawingsetup.rst#templates.
Reply | Threaded
Open this post in threaded view
|

Re: Default drawing - empty.dxf

Jim Winkler
Thanks for your quick response, flywire!

BTW: On those instructions, I would suggest add an instruction to set the units to millimeters. Doesn't quite work when it's in inches. (When is the USA population ever going to convert? It's a conspiracy!)

The directory where "File/Open" and "File/New From Template" seem to be tied together. If I use "File/Open" and change directories to "C:\docs\dwgs" and open, say "A.dxf", then "File/New From Template" it goes to "C:\docs\dwgs". I change directories to, say, "C:\docs\templates" and open a template. Then, I do a "File/Open" and I am still at "C:\docs\templates" instead of "C:\docs\dwgs". (made up directories for brevity BTW)

Is this the normal behavior? Is there a way to separate the directories that "File/Open" and "File/New From Template"  use?

Thanks again! -Jim
Reply | Threaded
Open this post in threaded view
|

Re: Default drawing - empty.dxf

Gary S
This post was updated on .
Instead of trying to modify empty.dxf, create your own template and place it in your own user-defined library, e.g. "C:\docs\dwgs\template\myTemplate.dxf".   You can then configure LibreCAD to use your template when it is launched.  Specify the path/filename to the template you created by selecting Options -> Application Preferences, go to the "Paths" tab and populate the "Template" field.  The specified template is used instead of the default LibreCAD template when the application is launched and for new drawings.

There are a couple of benefits; as you discovered, changes to 'empty.dxf' don't stick, and if you update LibreCAD at a later date, you won't loose the custom template you created.

LibreCAD defaults to the last directory used when opening a file.  That is its normal behaviour...
Reply | Threaded
Open this post in threaded view
|

Re: Default drawing - empty.dxf

Jim Winkler
That works! I had put C:\Users\Jim\Documents\LibreCAD\Templates\empty.dxf (with a custom empty.dxf file in that path) and it didn't load. Then used "Template A.dxf" instead of "empty.dxf" - C:\Users\Jim\Documents\LibreCAD\Templates\Template A.dxf and it Template A.dxf loads on startup and File/New! Yea! Thanks for the tip @Gary_S!

If I want to load a different template from C:\Users\Jim\Documents\LibreCAD\Templates I have to do a lot of clicking on File/Open to get to C:\Users\Jim\Documents\LibreCAD\Templates Then, when I want to open another drawing on my original directory, I need to change directories back. Should I report this as a bug?

It would seem that when one uses "New From Template", it should go to the directory specified in Options/Application Preferences / Paths / Template and not to the current directory. Same with Paths / Parts Library, Fonts, and Hatch Patterns.

Thanks -Jim