MACRO:Work Feature 2014_12
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: MACRO:Work Feature 2014_12
hi
done
mario
done
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.
My macros on Gist.github here complete macros Wiki and forum.
-
- Posts: 181
- Joined: Tue Oct 21, 2014 9:47 am
- Location: Pau (France)
Re: MACRO:Work Feature 2014_12
Mario52,
1- I move the "Create Plane" button in Plane tab
2- In Objects tab I create 2 buttons to generate Cylinders "forages pour toi" and Cuboids
The new code is attached
If you feel it is ok could you upfate the Macro recipes for me?
Thank you so much for your help.
Merci d'avance pour ton aide.
Rentlau_64
1- I move the "Create Plane" button in Plane tab
2- In Objects tab I create 2 buttons to generate Cylinders "forages pour toi" and Cuboids
The new code is attached
If you feel it is ok could you upfate the Macro recipes for me?
Thank you so much for your help.
Merci d'avance pour ton aide.
Rentlau_64
- Attachments
-
- forage.jpeg (101.55 KiB) Viewed 3005 times
-
- WF_2015_01_25.zip
- (180.61 KiB) Downloaded 402 times
Re: MACRO:Work Feature 2014_12
hi
done
mario
done
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.
My macros on Gist.github here complete macros Wiki and forum.
Re: MACRO:Work Feature 2014_12
Hello Rentlau_64,
I do not consider myself as a completely clueless person, but I struggled a lot to make your macro work.
The only way that it will work is if all the files are extracted in ~/.FreeCAD. But that's not where my macro folder is located.
Trying to execute WF_2015_01_25.FCMacro in a different folder, I get this error:
I could only fix this by changing my Macro path to ~/.FreeCAD, move the files there, execute it once, so it generated a "WFGui_2015_01_25.pyc" file; then I moved all files back to my Macro folder. Once I restart FreeCAD, the macro works properly.
Just a couple of things though:
I do not consider myself as a completely clueless person, but I struggled a lot to make your macro work.
The only way that it will work is if all the files are extracted in ~/.FreeCAD. But that's not where my macro folder is located.
Trying to execute WF_2015_01_25.FCMacro in a different folder, I get this error:
Code: Select all
Traceback (most recent call last):
File "/home/normand/Dessins/Macros_FreeCAD/WF_2015_01_25.FCMacro", line 47, in <module>
import WFGui_2015_01_25 as WFGui
<type 'exceptions.ImportError'>: No module named WFGui_2015_01_25
Just a couple of things though:
- Once the macro is executed, there is apparently no way to close the "Work Features" tab.
- An empty tab is created along the "Work Features" tab.
Re: MACRO:Work Feature 2014_12
hi
my home it works well
before I had my macros in C:\Program Files\FreeCAD 0.14
and now I have just moved to C:\Users\xx\AppData\Roaming\FreeCAD
test in C:\xxxxxxx\Macro Utiles\WF_2015_01_25
and I have no problem
launch the macro with WF_2015_01_25.FCMacro
ps:the whole must be in the same place and works well regardless of location
(tout l'ensemble doit être à la même place et fonctionne bien quelque soit l'endroit)
mario
my home it works well
before I had my macros in C:\Program Files\FreeCAD 0.14
and now I have just moved to C:\Users\xx\AppData\Roaming\FreeCAD
test in C:\xxxxxxx\Macro Utiles\WF_2015_01_25
and I have no problem
launch the macro with WF_2015_01_25.FCMacro
ps:the whole must be in the same place and works well regardless of location
(tout l'ensemble doit être à la même place et fonctionne bien quelque soit l'endroit)
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.
My macros on Gist.github here complete macros Wiki and forum.
-
- Posts: 181
- Joined: Tue Oct 21, 2014 9:47 am
- Location: Pau (France)
Re: MACRO:Work Feature 2014_12
Normandc,
As Mario said as soon the zip or tar file is extracting all the files into your MACRO directory it must works....
Stange behavior that you described ? Do you run FreeCAD under Windows (I never tested under Windows)?
Did you tested an old release to see If I made a mistake in the recent one? i.e. WF_2015_01_18.tar.gz ?
small tools still accessible if I switch to another workbench! Do you know how to by pass this behavior?
Have a nice day
Rentlau_64
As Mario said as soon the zip or tar file is extracting all the files into your MACRO directory it must works....
Stange behavior that you described ? Do you run FreeCAD under Windows (I never tested under Windows)?
Did you tested an old release to see If I made a mistake in the recent one? i.e. WF_2015_01_18.tar.gz ?
No, not up to date but I will do it.. I have an example from Mario to do so.Once the macro is executed, there is apparently no way to close the "Work Features" tab.
Yes because I discovered that if I open a FreeCAD file after opening my MACRO, after a while my "Work Feature" labelled tab become a "Projet" labelled tab...I fix it by letting the space to "Projet" tab with an empty tab... not very proud of that!An empty tab is created along the "Work Features" tab.
I am developping more small tools and probaly I will do what you suggest but my concern is the fact that I will not have myI have a suggestion: to make it as a python module that you can drop in ~/.FreeCAD/Mod then have it available in the workbench switcher.
small tools still accessible if I switch to another workbench! Do you know how to by pass this behavior?
Have a nice day
Rentlau_64
Re: MACRO:Work Feature 2014_12
Hi,
I found this macro very useful, there are plenty of macros for FC, but this one is very productive / effective.
Thanks!
I found this macro very useful, there are plenty of macros for FC, but this one is very productive / effective.
Thanks!
Re: MACRO:Work Feature 2014_12
Hi,
Thanks for this new feature very usefull.
I have the same problem as NormandC with the same issue message (on line 47) for the WF_2015_01_25 :
I'm under Ubuntu :
Thanks for your help,
Thierry
Thanks for this new feature very usefull.
I have the same problem as NormandC with the same issue message (on line 47) for the WF_2015_01_25 :
If I extract the zip file directly in ./FreeCAD/ directory, I have the same problem.Traceback (most recent call last):
File "/home/thierry/.FreeCAD/WF_2015_01_25/WF_2015_01_25.FCMacro", line 47, in <module>
import WFGui_2015_01_25 as WFGui
<type 'exceptions.ImportError'>: No module named WFGui_2015_01_25
I'm under Ubuntu :
Code: Select all
OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4544 (Git)
Branch: master
Hash: b67405e16ece8c705969a7095d0a152e49dacbe6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1
Thierry
Linux Mint 21.2, 64 bits, Freecad 0.21
Re: MACRO:Work Feature 2014_12
Hi everyone and rentlau_64,
I made a little improvement to the macro. It's nothing but as I very don't like having all this file in my macro folders I have done this :
I have create a new folder called WorkFeature with all files needed inside.
I have rename WF_2015_01_25.FCMacro in __init__.py
Outside the new folder I have created a FCMacro called start_WF.FCMacro with this :
Now in my FC macro folder I have start_WF.FCMacro file and WorkFeature folder.
It is very more clear to me, and it's let's you the ability to make update without the user having to change the name of the macro to start the tool. For example I have a button to start the macro and now even if you make update I don't have to edit this custum macro.
You can see and download this on my github repo : https://github.com/wood-galaxy/FC-WorkFeature
rentlau_64, pehaps it's time to make a github repo Just fork my repo
I made a little improvement to the macro. It's nothing but as I very don't like having all this file in my macro folders I have done this :
I have create a new folder called WorkFeature with all files needed inside.
I have rename WF_2015_01_25.FCMacro in __init__.py
Outside the new folder I have created a FCMacro called start_WF.FCMacro with this :
Code: Select all
import WorkFeature
WorkFeature.WorkFeatureTab()
It is very more clear to me, and it's let's you the ability to make update without the user having to change the name of the macro to start the tool. For example I have a button to start the macro and now even if you make update I don't have to edit this custum macro.
You can see and download this on my github repo : https://github.com/wood-galaxy/FC-WorkFeature
rentlau_64, pehaps it's time to make a github repo Just fork my repo
Formations - Assistance - Développement : https://freecad-france.com
Re: MACRO:Work Feature 2014_12
Hi,
I have solved my problem : it was a problem on my distro with python and pyside on my computer (I added the missing packages). And so it's working now.
Rockn, I have installed your "fork" and it's working fine.
Thanks, regards,
Thierry
Edit : There's a problem with the display, an empty tab (see the picture)
I have solved my problem : it was a problem on my distro with python and pyside on my computer (I added the missing packages). And so it's working now.
Rockn, I have installed your "fork" and it's working fine.
Thanks, regards,
Thierry
Edit : There's a problem with the display, an empty tab (see the picture)
Last edited by ThierryM on Fri Feb 13, 2015 12:27 pm, edited 1 time in total.
Linux Mint 21.2, 64 bits, Freecad 0.21