Macro not executing

Need help, or want to share a macro? Post here!
RA13
Posts: 4
Joined: Tue May 14, 2019 12:59 pm

Macro not executing

Postby RA13 » Tue May 14, 2019 1:04 pm

New to FreeCAD and trying to get a macro working. It appears as start_bolts.FCMacro in Execute macro but after pressing execute nothing happens. Any ideas? Do I need to install something else additionally?
User avatar
Kunda1
Posts: 4803
Joined: Thu Jan 05, 2017 9:03 pm

Re: Macro not executing

Postby Kunda1 » Tue May 14, 2019 3:32 pm

Welcome to the forum. We can't help you without knowing more about your setup and steps to reproduce. Please familiarize yourself with the forum guidelines. You'll get a higher probability of informative response(s) if you make the effort to help us help you ;)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
jmaustpc
Posts: 9532
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Macro not executing

Postby jmaustpc » Tue May 14, 2019 3:39 pm

Also turn on Report view and change the settings to send Python and error messages to report view, then you can post any error messages.
RA13
Posts: 4
Joined: Tue May 14, 2019 12:59 pm

Re: Macro not executing

Postby RA13 » Tue May 14, 2019 5:10 pm

Kunda1 wrote:
Tue May 14, 2019 3:32 pm
Welcome to the forum. We can't help you without knowing more about your setup and steps to reproduce. Please familiarize yourself with the forum guidelines. You'll get a higher probability of informative response(s) if you make the effort to help us help you ;)
Yes thanks, I've dabbled in gimp but finding FreeCAD easier to get my head around. Already printed off my first few custom parts.

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16110 (Git)
Build type: Release
Branch: (HEAD detached at upstream/releases/FreeCAD-0-18)
Hash: f7dccfaa909e5b9da26bf50c4a22ccca9bb10c40
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)


Attached two versions of the macro, neither do anything after pressing execute, zip because there are folders as well as macro files.
jmaustpc wrote:
Tue May 14, 2019 3:39 pm
Also turn on Report view and change the settings to send Python and error messages to report view, then you can post any error messages.
Thanks for that, this is what report view is saying.

File "C:/Users/xxxxxxxx/Downloads/Printing/FreeCAD/BOLTSFC-bc582ca724773ffe5cbd9f1b7e01df482e011e88\BOLTS\__init__.py", line 21, in <module>
import bolttools.blt
<class 'ModuleNotFoundError'>: No module named 'bolttools'
Attachments
BOLTSFC-d1c6fa2d99a2120ccbe756df712c4c1059b9c1b0.zip
(185.39 KiB) Downloaded 2 times
BOLTSFC-bc582ca724773ffe5cbd9f1b7e01df482e011e88.zip
(185.29 KiB) Downloaded 1 time
vocx
Posts: 727
Joined: Thu Oct 18, 2018 9:18 pm

Re: Macro not executing

Postby vocx » Wed May 15, 2019 2:33 pm

RA13 wrote:
Tue May 14, 2019 5:10 pm

Attached two versions of the macro, neither do anything after pressing execute, zip because there are folders as well as macro files.
How did you install the BOLTSFC macro? You should use the Addon Manager for this.

Also, I remember this external workbench had some issues working with Python 3, but I think the current maintainer solved this problem. It may still have some errors though.
Last edited by vocx on Wed May 15, 2019 9:27 pm, edited 1 time in total.
RA13
Posts: 4
Joined: Tue May 14, 2019 12:59 pm

Re: Macro not executing

Postby RA13 » Wed May 15, 2019 3:37 pm

Found on google https://forum.freecadweb.org/viewtopic.php?t=36186 searching for freecad Missing parentheses in call to 'exec' which is the error I got after trying the addon manager which btw didn't seem to work yesterday when I tried it, got stuck on the download page. Works with python 2 apparently but idk how to revert.

import BOLTS
File "C:\Users\xxx\AppData\Roaming\FreeCAD\Mod\BOLTSFC\BOLTS\__init__.py", line 40, in <module>
from .gui import freecad_bolts as boltsgui
File "C:\Users\xxx\AppData\Roaming\FreeCAD\Mod\BOLTSFC\BOLTS\gui\freecad_bolts.py", line 29, in <module>
Ui_BoltsWidget,QBoltsWidget = uic.loadUiType(join(bolts_path,'bolts_widget.ui'))
<class 'SyntaxError'>: Missing parentheses in call to 'exec' (<string>, line 15)
UR_
Posts: 864
Joined: Tue Jan 03, 2017 8:42 pm

Re: Macro not executing

Postby UR_ » Wed May 15, 2019 4:22 pm

Please see this thread for reference: https://forum.freecadweb.org/viewtopic. ... 86#p306308

You posted you are using Version: 0.18.16110 (Git)
Perhaps you are willing to test a daily build. I think this bug is gone. :?:
User avatar
bernd
Posts: 8046
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Macro not executing

Postby bernd » Wed May 15, 2019 6:39 pm

you need latest 0.19 or latest 0.18.2 to get BOLTS on Python3, or use Python2 builds.
User avatar
bernd
Posts: 8046
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Macro not executing

Postby bernd » Thu May 16, 2019 7:08 am

0.19 dev for windows to download is at 0.19.16687 The bugfix for BOLTS on Python 3 is 0.19.16695, means you need to wait until a new 0.19 dev build is uploaded to get it working on Windows.

bernd
RA13
Posts: 4
Joined: Tue May 14, 2019 12:59 pm

Re: Macro not executing

Postby RA13 » Thu May 16, 2019 7:34 pm

Great, got it to work with 18.1 32bit however the bolts don't have a screw, just a plain rod. Can make nuts with Blender in the mean time.