Image scaling Macro

Need help, or want to share a macro? Post here!
Jee-Bee
Posts: 1064
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Image scaling Macro

Postby Jee-Bee » Fri Aug 19, 2016 12:36 pm

keithg wrote:I registered on this forum simply to say thank you for this macro. I have to use reference drawings a lot and this will save me sooo much time. Well done.
Welcome at the forum!!
jcr
Posts: 6
Joined: Sat Mar 04, 2017 10:38 pm

Re: Image scaling Macro

Postby jcr » Sun Mar 05, 2017 3:56 am

Hi, I am new to this and I thought this Macro would be useful but I am not sure if I am installing it or using it correctly. It says I am getting a Syntax Error when I try executing it 48,73 not sure if anyone had that issue?
chrisb
Posts: 9045
Joined: Tue Mar 17, 2015 9:14 am

Re: Image scaling Macro

Postby chrisb » Sun Mar 05, 2017 12:48 pm

Perhaps it is a locale problem, did you try entering the value as 48.73
jcr
Posts: 6
Joined: Sat Mar 04, 2017 10:38 pm

Re: Image scaling Macro

Postby jcr » Sun Mar 05, 2017 1:54 pm

No i just copy and pasted the macro code into the macro creation part. I have also tried the downloaded macro file and still the same error.

Does the file need to be in a specific directly?
chrisb
Posts: 9045
Joined: Tue Mar 17, 2015 9:14 am

Re: Image scaling Macro

Postby chrisb » Sun Mar 05, 2017 2:05 pm

The file has to be in your macro directory which can be configured in Preferences->General->Macro->Macro path.
jcr
Posts: 6
Joined: Sat Mar 04, 2017 10:38 pm

Re: Image scaling Macro

Postby jcr » Sun Mar 05, 2017 2:17 pm

which I did define since my macro directory is not the default location.
User avatar
sliptonic
Posts: 1137
Joined: Tue Oct 25, 2011 10:46 pm

Re: Image scaling Macro

Postby sliptonic » Tue May 08, 2018 2:10 pm

This macro is broken. It looks like most of the code is completely missing.
It ends on line 47 with a missing close ')' which is why it is giving the error noted.

Is there an updated version of this macro somewhere that actually works?

I really think this is necessary functionality for the image workbench. Perhaps it should be fixed up and included directly.

Also, the image workbench really needs different icons for the two tools on the toolbar.
User avatar
easyw-fc
Posts: 1726
Joined: Thu Jul 09, 2015 9:34 am

Re: Image scaling Macro

Postby easyw-fc » Tue May 08, 2018 2:15 pm

sliptonic wrote:
Tue May 08, 2018 2:10 pm
This macro is broken. It looks like most of the code is completely missing.
It ends on line 47 with a missing close ')' which is why it is giving the error noted.

Is there an updated version of this macro somewhere that actually works?

I really think this is necessary functionality for the image workbench. Perhaps it should be fixed up and included directly.

Also, the image workbench really needs different icons for the two tools on the toolbar.
in the page there is a download link (I know it is a bit hidden :D )
http://forum.freecadweb.org/download/file.php?id=19542

link.png
link.png (18.31 KiB) Viewed 110 times
User avatar
sliptonic
Posts: 1137
Joined: Tue Oct 25, 2011 10:46 pm

Re: Image scaling Macro

Postby sliptonic » Tue May 08, 2018 2:25 pm

Ok. But when the macro is installed from the Addon Manager, the only thing installed is the partial snippet visible on the Wiki page.
User avatar
sliptonic
Posts: 1137
Joined: Tue Oct 25, 2011 10:46 pm

Re: Image scaling Macro

Postby sliptonic » Tue May 08, 2018 2:48 pm

Line 47 has a pipe character that seems to be breaking the code template.