Tumgik
jjanstad · 8 years
Link
0 notes
jjanstad · 8 years
Photo
Tumblr media
Make PDFs in solidworks 2014 automated. Download the script here: .ahk version Download the executable here: .exe version Download zip file here: .zip version
Open all drawings in solidworks, disable all PDM systems, hit ctrl + 1. Should the script go haywire hit windows-button and x to abort the script.
The script opens the save as, selects pdf, clicks OK through all the menues (all pages will be exported). then closes the file. redoes the whole procedure until no more drawings can be found. It then stops with a popup message “done”. 
Enjoy!
Here is the code in text format
msgbox open all drawings in SW2014. Make sure the save as directory is set to the location you want. Initiate with ctrl+1. //// ABORT WITH WIN+X \\\\ For best result export to HDD and disable PDM addin and then run.
#x::Exitapp
^1:: ;ctrl 1 activates
;1: A window's title must start with the specified WinTitle to be a match. ;2: A window's title can contain WinTitle anywhere inside it to be a match. ;3: A window's title must exactly match WinTitle to be a match.
loop{ SetTitleMatchMode, 2  IfWinExist, Sheet  {    WinActivate  ; Automatically uses the window found above.    Send !f    sleep, 200    send a    sleep, 1000
SetTitleMatchMode, 3    IfWinExist, SolidWorks    {        WinActivate        sleep, 500        send n        sleep, 500    }    send {Tab}    send a    sleep, 500    send {enter}    sleep, 500 SetTitleMatchMode, 3    IfWinExist, Confirm Save As    { WinActivate        sleep, 200        send y        sleep, 1000    } SetTitleMatchMode, 3    IfWinExist, PDF Export    {        WinActivate        sleep, 1000        send {enter}        sleep, 200    }    sleep, 1000    send ^{F4}    sleep, 200    send n    sleep, 2000  }  SetTitleMatchMode, 2  IfWinNotExist, Sheet    {    msgbox done    Break    } }
return
0 notes
jjanstad · 8 years
Link
I designed this rubber band loaded phone holder to mount my phone on my bike, it is posted under my works user. Works like a charm. Head over to Thingiverse to download and more info.
3 notes · View notes
jjanstad · 9 years
Note
Thanks for your advice to purge in creo
No problem, glad I can help!
0 notes
jjanstad · 9 years
Note
Thank you. "AutoHotKey Mouse fixes" is amazing.
You are welcome! I hope they all worked.
0 notes
jjanstad · 9 years
Text
AutoHotKey Mouse fixes for Inventor, Catia and Creo
Tumblr media
  I use Inventor, Catia, Creo and Solidworks a lot in my work but hate how they all have different mouse behaviours. I have therefore written a script to make them all more like my favourite, SolidWorks. I'd like to share them with you, because today i feel nice!
getting a space mouse is the best option but if you dont have one I'd recommend this.
I am not too sure if the window class is the correct one for all of the versions. you might have to manually reconfigure that.
if you dont have AutoHotKey you can use the exe files that i have compiled of the scripts. It is a stand alone version of Autohotkey preconfigured with the script. You shouldnt trust exe-files you download from the interwebs, but they are safe. if not download autohotkey and create the scripts using the code or .ahk files.
Inventor
DOWNLOAD exe and ahk: rotate_inventor2014.zip (updated 2017-11-18) Inventor uses weird buttons to manipulate the model. like F4-rightclick to set pivot point etc. fixes below. It works for 2014 but i think it should work for other versions too. if not change the #IfWinActive class to "Autodesk Inventor 2011" for 2011 version, etc.
-Middle mouse now rotates the model -shift+middle mouse sets the pivot point and rotates (instead of F4+click + right click) -mouse button 4 (thumb button) pans the model -Alt + rightclick also pans.   ;-----rotate around with Mbutton
Mbutton:: send {LShift Down}{Mbutton Down} KeyWait, Mbutton ; Wait for user to physically release it. send {LShift Up}{Mbutton Up} return
;----rotate around pivot with shift Mbutton
+Mbutton:: SendInput {F4 Down} Send {Click} sleep 600 SendInput {LButton Down}
KeyWait, Mbutton ; Wait for user to physically release it. send {F4 Up}{LButton Up} return
;----rotate around pivot with thumb
XButton1:: SendInput {F4 Down} Send {Click} sleep 600 SendInput {LButton Down}
KeyWait, XButton1 ; Wait for user to physically release it. send {F4 Up}{LButton Up} return
CATIA
DOWNLOAD exe: catia_v0.41_mouse-script.zip (updated 2017-11-18)
Catia is one of the worst CAD programs for mouse orientation. really awkward combinations of buttons and not at all close to how the mouse behaves in other programs. My hand and wrist will actually get strained after a few hours cadding with the default settings.
-scroll wheel now zoom the model. (default is ctrl + mbutton and then move mouse up or down), this is slightly buggy and if you scroll too fast you will zoom in the left hand menu instead. anyone got a better code? -middle mouse now rotates model (before middle mouse and right click together did this) -thumb button (xbutton1) pans the model instead of middle button.
#IfWinActive CATIA V5
MButton:: SendInput {Mbutton down}{RButton down} ; Hold down middle and right. Loop { Sleep, 10 GetKeyState, state, MButton, P if state = U ; The key has been released, so break out of the loop. break } SendInput {MButton up}{RButton up} ; Release the mouse buttons. return ;---------------
XButton1:: SendInput {Mbutton down} ; Hold down middle.
Loop { Sleep, 10 GetKeyState, state, XButton1, P if state = U ; The key has been released, so break out of the loop. break } SendInput {MButton up} ; Release the mouse buttons. return
;---------------- zoom in
WheelUp:: SendInput {Ctrl down}{MButton down} MouseMove, 0, -50, 1, R ;move mouse upp, relative from position, zooming in. SendInput {Ctrl up}{MButton up} MouseMove, 0, 50, 1, R ;move back the mouse pointer to where it began. return ;---------------- zoom out
WheelDown:: SendInput {Ctrl down}{MButton down} MouseMove, 0, 50, 1, R SendInput {Ctrl up}{MButton up} MouseMove, 0, -50, 1, R return
Creo
DOWNLOAD exe and ahk: creo_zoom_dot.zip (updated 2017-11-18)
Creo inverts the scroll wheel and there is NO option to change it inside the program. Autohotkey fixes this. I also have a swedish keyboard so my dot (in decimals) is a comma on the numpad. inventor doesn't realize this so i fixed that too.
-scroll up zooms in (instead of zooming out) -scroll down zooms out (instead of zooming in) numpad dot = dot (instead of comma)
Be aware that it will also scroll in reverse in big menues that are opened in Creo.. but i rather do that then zoom out/in in reverse.
#IfWinActive, ahk_class Dialog WheelDown::WheelUp WheelUp::WheelDown NumpadDot:: send {.} return [/code]
[b]MathCadPrime[/b] same problem with comma and dot.
-replace the decimal-comma with dot.
[code=auto:0]#IfWinActive, ahk_class HwndWrapper[MathcadPrime.exe;;da8776fe-cdea-40a6-8534-d2045a81b7a7] NumpadDot:: send {.} return
ENJOY!
1 note · View note
jjanstad · 10 years
Note
you link for purge is really useful. Thanks Sandip halder4san@gmailcom
Thanks! Hope you found it useful.
1 note · View note
jjanstad · 10 years
Text
purge in Creo 2.0
I got tired of trying to delete old versions of my induvidual parts. Creo creates a bunch of them. everytime you save you get a new and i end up with hundereds of them in my work folder. After some serching i found the answer.
Tumblr media
Located in C:\Program Files\PTC\Creo 2.0\Parametric\bin is a file called purge.bat. This file will clean out your folder of choice of all old versions, logfiles and more crap you never use. However it is not just as simple as to run it, it is DOS based and for DOS to recognize it it needs to be linked to from the control panel.
Tumblr media
-->control panel --> system --> advanced system settings --> environment variables A new window shows up. under system variables find "path". click edit. at the end of the dialog box add a semicolon followed by the folder path to your purge.bin file.
e.g ...4;C:\Program Files\MATLAB\R2011b\bin;C:\Program Files\PTC\Creo 2.0\Parametric\bin
save and close. (I recommend you restart windows after)
To run the purge file open creo and make a new mapkey. instead of recording one click to OS tab and write purge in the text-field. bind the script to whatever key you want. i bound mine to "purge" so when i type it in it will run it for me.
Tumblr media
Now every time you type purge Creo will open a DOS-command window for your working directory and run the purge-bat file. delete all old versions of your file.
Tumblr media
0 notes
jjanstad · 10 years
Photo
Tumblr media
Arduino starter kit! Best christmas present of the year! Can warmly recommend for anyone who wants to start programming and building microcontrollers. Hopefully I'll learn the basics towards building some cool stuff like pathfinding robots and flying drones. Firstly however i starting off easy with some projects from the projects book. Like colour mixing lamp, digital hourglass, motorized pinwheels and more.  www.arduino.cc
2 notes · View notes
jjanstad · 10 years
Link
PTC matcad express is free! gives you the basic functions. Been wanting to dig my teeth into this for some time now. Tired of excel and cell references that bugs up.
Thanks PTC!
0 notes
jjanstad · 11 years
Link
First time I ever run 10km. Also first time I run in a race.  Place: 50 (out of 69) Time: 50:39 Length: 10km
Hoping to make an even better result next year. Team malthyddan.
0 notes
jjanstad · 11 years
Photo
Tumblr media
Show the world we want a phone worth keeping! #phonebloks http://thndr.it/15eLEMU
0 notes
jjanstad · 11 years
Photo
Tumblr media
Hiking in switzerland. walking down monte generoso (7 o'clock) to muggio (12 o'clock.) have a break in the middle on a small top (centre) whipped out my camera and took a few shots that after a little cheating was made into a mini-planet. Edited with microsoft ICE and photoshop. (c) Joakim Janstad 2013
0 notes
jjanstad · 11 years
Text
invert scroll in PTC Creo
Tumblr media
revcreozoom.exe is a simple autohotkey script I made to invert the scrolling in PTC creo parametrics 2.0
#IfWinActive, ahk_class Dialog WheelDown::WheelUp WheelUp::WheelDown
The autohotkey class for the parametric 2.0 window is called Dialog (you can double check this with the window spy, right click the autohotkey icon in system tray, select Window Spy and replace Dialog with whatever value you get for your active window if that change). The script becomes active when this window is active. The scrollwheel is then inverted to make the zooming behave like other CAD programs, googlemaps and more.
Why there isn't an option for this inside the program is just laziness from PTC's side since it was a problem in PRO/Engineer too.
revcreozoom.exe is the compiled script I made that you can download and run on your computer yourself, no fuss. Alternativly download autohotkey here: www.autohotkey.com install Right click on you desktop and select new -> autohotkey script. rightclick on it and select edit. Paste in the code. Save and exit. Doubleclick the script.
To make it start with windows place a shortcut for it in the autostart folder in your windows start menu.
0 notes
jjanstad · 11 years
Link
Very good source for HTML and CSS coding. Can strongly recommend it. Helped me a lot to build Attotech.se 
0 notes
jjanstad · 11 years
Photo
Tumblr media
Caught a lovely perch today, 900 grams. Bergundasjön in Växjö. It was cold, hence the full outfit.
0 notes
jjanstad · 11 years
Photo
Tumblr media Tumblr media
attotech.se that I am webmaster for just got its new look. I'm doing the html, CSS and image editing. Very pleased with the result.
0 notes