Custom editable symbol

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
MrCAD
Posts: 65
Joined: Fri Jul 31, 2020 9:42 am

Custom editable symbol

Post by MrCAD »

In TechDraw WB, there is place for custom or editable field of its template and I'm also familiar with how to make custom title block or Template (for TechDraw WB) using FreeCAD and Inkscape.

But, from user perspective, I am also looking for custom technical symbol such as Machining symbol
However, I found that svg symbol can be used for any custom symbol.

So out of the curiosity and technically required sometimes, I am trying to find where to put an editable custom symbol just like an editable field in template made with svg format.

Like this...
(the blinking text below GIF can be editable as in freecad:editable)
But how about Symbol (for eg., First / Third Angle symbol as shown below).
custom symbol.gif
custom symbol.gif (50.13 KiB) Viewed 641 times
I learnt that xml scripting for editable field for text in TechDraw template using Inkscape from Wiki.

Is there any xml scripting tutorial or option available in latest stable version for the same? How to use xml to toggle symbols or having a drop down menu to select from for such purpose? I don't know much about xml scripting :) , except this template stuff.
mario52
Veteran
Posts: 4696
Joined: Wed May 16, 2012 2:13 pm

Re: Custom editable symbol

Post by mario52 »

hi

here example macro (only for FC 0.19 and Drawing Workbench) but with creation line in code

Image

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
chrisb
Veteran
Posts: 54273
Joined: Tue Mar 17, 2015 9:14 am

Re: Custom editable symbol

Post by chrisb »

Besides your macros, I appreciate the timeline in your animated gif, making clear when it starts!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mario52
Veteran
Posts: 4696
Joined: Wed May 16, 2012 2:13 pm

Re: Custom editable symbol

Post by mario52 »

hi

i use ScreenToGif for Windows

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
mendy
Posts: 262
Joined: Mon May 21, 2018 2:16 pm

Re: Custom editable symbol

Post by mendy »

Hello, depending on level of pain you are willing to do.
A possible workaround can be creating a font using your desired symbols and in template add editable text field where you want symbol.
Admit don't know how to create the text from svg but did experiment using weldingsymbols font.
In my existing template just changed two fields to use the welding font.
Probably not good but just an idea.
Caveat create new template name as I messed up when I changed the font in my existing templates.
Attachments
font.jpg
font.jpg (54.13 KiB) Viewed 518 times
Post Reply