Run an in-memory macro as if run by MacroManager
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Run an in-memory macro as if run by MacroManager
Does it also fail on linux and mac? It fails for me on 0.19 and 0.20 in windows, but not with an older version (0.18 py2/qt4 build) and not on 0.20 running inside a virtual machine (ubuntu guest running on a windows 10 host). Does the application itself have a certificate that needs to be updated?
Re: Run an in-memory macro as if run by MacroManager
have formed a vague idea around that (not put into action),
for whatever reason that html generator is clipping the "source code" in the template, that could be worked around by not looking at the html page of the wiki, but rather go to an address like https://wiki.freecadweb.org/index.php?t ... emplates=1 which opens up for getting the full version of the macro from the wiki regardless if it is capped or not in the html. would probably simplify parsing as well - have not looked at it, but suppose it is regexp which if in python is slow...
Re: Run an in-memory macro as if run by MacroManager
I admit that I didn't follow this topic. What exactly can/should I test?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Run an in-memory macro as if run by MacroManager
Addon manager fails to get the list of macros from the wiki. It gets the git repo macros, but not the wiki. It works in my ubuntu virtual machine (ubuntu guest / windows host) and in windows if I use 0.18 py2/qt4 build.
Re: Run an in-memory macro as if run by MacroManager
Works here, but I have GitPython installed.
OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git)
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.9.7
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Run an in-memory macro as if run by MacroManager
Perhaps the lack of git python is part of the issue with windows versions. Yet if I enter into the python console:
it works without a hitch.
But I think it might be fixed anyway. I applied the patch to my local files, so I don't know if fixing the ssl certificate solved it or not. There is mention of this in the developer board.
Code: Select all
from git import Repo
But I think it might be fixed anyway. I applied the patch to my local files, so I don't know if fixing the ssl certificate solved it or not. There is mention of this in the developer board.
Re: Run an in-memory macro as if run by MacroManager
The Git Python thing is separate from the Wiki thing -- the macros on the wiki are only fetched from the wiki, over https. The Git Python difference is whether we can use git clone to download a repo, or if we have to download the zip file instead.
- thomas-neemann
- Veteran
- Posts: 11939
- Joined: Wed Jan 22, 2020 6:03 pm
- Location: Osnabrück DE 🇩🇪
- Contact:
Re: Run an in-memory macro as if run by MacroManager
Sorry if my question doesn't quite fit here, but I've been looking for a way to integrate "return" into a freecad macro for hours. here is the thread:
https://forum.freecadweb.org/viewtopic.php?f=22&t=72820
you write:
you can do that in this line
Code: Select all
Gui.runCommand('Std_Copy',0)