Online since 2002. Over 3300 puzzles, 2600 worldwide members, and 270,000 messages.

TwistyPuzzles.com Forum

It is currently Wed Jul 23, 2014 7:31 pm

All times are UTC - 5 hours



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: SolidWorks Split multiple bodies FIX
PostPosted: Thu Feb 27, 2014 2:32 pm 
Offline
User avatar

Joined: Tue Mar 22, 2011 1:26 pm
Location: Québec, Canada
I finally found a solution to the pain of having to select all check boxes one by one :D
Let's put us in context first... I recently discovered that all the workstations at work* have SolidWorks 2010 installed on them, because my company had previously (long before I was hired) developed a plugin (for SolidWorks) for one of our clients. So this week during lunchtime, instead of browsing the internet, I played with SolidWorks (to design the new Jing's and molds). Since my workstation barely runs SolidWorks, the step of splitting and selecting the resulting parts is very slow and buggy.
So the eternal question which cannot be answered came to my mind again : "Why there isn't a check all button?!". :lol:
Oh Well, I know not everyone find it problematic and that it can be avoided (e.g. by splitting only the necessary parts), but I always wondered if there was a definitive solution.
(If I remember well)Eitan already posted about this problem on this forum and also to SolidWorks, but no solution. I have posted on that topic a trick that consist of using a macro software to click a checkbox and then pressing the down key in a loop.

This lunchtime, while playing with SolidWorks, a flash of genius came to me... When you click on button, Windows (the OS) sends a message to the window/button saying "hey the left mouse button is down at x/y", the application then handle that message and if it was over the button, then it execute the action. So I opened up a software called "Spy++" (made by Microsoft), it's a program that list every window (each button,label,textbox,listbox,checkbox is actually a "window") and can log all the messages that Windows send to them. While SolidWorks was opened, I navigated to find the "window" that is the list of checkboxes, and analysed the messages that were sent when I clicked.
Basically, it is two message : 1 - left button down at x/y, 2 - left button up at x/y.

The solution: (for those who don't want to read all the details, skip here :mrgreen: )
I quickly wrote a small program that send these two messages to that window in a loop that increment the Y position and.... IT WORKED :o It selected all the checkboxes in a split second!
For now the program is not able to find the window (they have an ID) by itself, and I have only tested for SW 2010. I'll refine it and test it with SW 2011 at home after work.
And unfortunately it will not work on computers other than Windows, sorry Apple & Linux users :(

*I work in a software development company that has nothing to do with engineering.

Download the software (Version 1.1) :
Attachment:
File comment: SplitHelper Installer V1.1
SplitHelper Installer v1.1.zip [360.51 KiB]
Downloaded 9 times

_________________
My Shapeways shop


Last edited by polymaker on Mon Mar 24, 2014 4:32 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Thu Feb 27, 2014 2:52 pm 
Offline

Joined: Sun Aug 26, 2012 10:01 am
Love how I read this as I'm waiting for 150 parts to split :lol:

This will be extremely helpful in the future! Can't wait to hear whether or not you have success with the later editions of Solidworks.

_________________
My YouTube, including a FF Siamese 2x2x2 Walkthrough


Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Thu Feb 27, 2014 7:28 pm 
Offline
User avatar

Joined: Tue Mar 22, 2011 1:26 pm
Location: Québec, Canada
Quick update : I made a couple of tests on larger scale split operations and with SW 2012 (I didn't remember which version I have).
It works but I encountered a problem that didn't occurred in a small split operation... as my program simulates mouse inputs, it is necessary to scroll down to be able to click them all... :mrgreen: (Yes, my tests this afternoon were splits with less than ten pieces...)
But I easily solved to problem by simulating a "page down" key after 10 checkboxes. Another thing I noticed is that sometimes*, if you edit an existing split operation, each time you check a box, SW rebuild the document, taking about a second. My program can do nothing against that, because when I send an input to SW in my loop to click each box, it waits that SW handle the input before continuing in my code to send the next input, and SW kinda freeze when it rebuild, so my program freeze too (not a problem).

Other than that it works perfectly. It is not yet in a state that it can be used by a "regular" user :lol: but it will not take long to finish.

*It occur mostly when the split operation you are editing is followed by other operations (of any kind) and/or the document is big. I think you can avoid this by firstly reverting to the operation you want to edit.

_________________
My Shapeways shop


Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Thu Feb 27, 2014 9:58 pm 
Offline
User avatar

Joined: Wed Jan 07, 2009 6:46 pm
Location: San Francisco, CA
Great work! I'm excited to see where this goes.

Unless you are exiting the Split Feature pane, SolidWorks really shouldn't be rebuilding in between checking boxes. This is odd behavior...

-Eitan

_________________
Eitan = "EIGHT-ahn"
Buy a Radio Cube 3! Only $150 at Eitan's Shapeways Shop
Check out my video: Twisty Puzzles a la Vi



Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Thu Feb 27, 2014 11:13 pm 
Offline
User avatar

Joined: Tue Mar 22, 2011 1:26 pm
Location: Québec, Canada
pirsquared wrote:
Unless you are exiting the Split Feature pane, SolidWorks really shouldn't be rebuilding in between checking boxes. This is odd behavior...
Properly speaking, it does not rebuild the document. In some of my design I tested my program with, when I check on box I get half a second of lag and it write in the bottom status bar "Rebuilding". I tried to replicate the behavior by first splitting into many parts a cube, then deleting some parts and re-splitting some others and then editing my first split but it didn't.

As I'm writing this post I went and tested it, and every time you check a box it actually write "Rebuilding" in the bottom status bar, but most of the time it blink very fast and it is almost impossible to read. So I think it has to do with the complexity of the document and the power of your computer, but what I don't understand is that my computer at home is really powerful :?


Attachments:
File comment: screenshot from a document that lag when I check the boxes
rebuilding split.png
rebuilding split.png [ 20.77 KiB | Viewed 1043 times ]

_________________
My Shapeways shop
Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Fri Mar 14, 2014 11:42 pm 
Offline
User avatar

Joined: Tue Mar 22, 2011 1:26 pm
Location: Québec, Canada
Hi guys!

Sorry for the delay, I sometimes get too perfectionist and when I realize the effort it requires to achieve the result I want I have tendency to put it off until later ... and on top of that I had (and still have) a cold.

I managed to finish all the functionality and the user interface today (this night :lol: ), all that remains is to make an installer for it. It should be done by the end of tomorrow.

I'm done for today, it is past midnight for me, in the meantime here is a preview of the software :


Attachments:
File comment: checkbox helper preview
Checkbox helper preview.png
Checkbox helper preview.png [ 32 KiB | Viewed 819 times ]

_________________
My Shapeways shop
Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Sat Mar 15, 2014 8:40 pm 
Offline
User avatar

Joined: Tue Mar 22, 2011 1:26 pm
Location: Québec, Canada
Here it is! If you have any questions or if you encounter bugs don't hesitate to contact me.

***EDIT***
Updated download link moved to the first post
***EDIT***

_________________
My Shapeways shop


Last edited by polymaker on Mon Mar 24, 2014 4:34 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Sat Mar 15, 2014 11:05 pm 
Offline
User avatar

Joined: Wed Jan 07, 2009 6:46 pm
Location: San Francisco, CA
OH MY GOD. I don't know how to thank you enough. It worked perfectly.

Thank you thank you thank you!

-Eitan

_________________
Eitan = "EIGHT-ahn"
Buy a Radio Cube 3! Only $150 at Eitan's Shapeways Shop
Check out my video: Twisty Puzzles a la Vi



Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Sun Mar 16, 2014 4:05 am 
Offline
User avatar

Joined: Sat Apr 21, 2007 11:21 pm
Location: Marin, CA
What?? I've been using an autoclick utility with a time delay to do this and it was really slow.
This is so FAST. Just did over 353 parts in about 10 seconds.
THANK YOU!

_________________
Jason Smith posted here as 'io' through 2012.
Visit Jason Smith's PuzzleForge on Shapeways!
Jason Smith's Puzzles - YouTube Channel.


Top
 Profile  
 
 Post subject: Re: SolidWorks Split multiple bodies FIX
PostPosted: Mon Mar 24, 2014 4:39 pm 
Offline
User avatar

Joined: Tue Mar 22, 2011 1:26 pm
Location: Québec, Canada
Hi everyone! It's me again,
I made a new version that added a little feature that enable to keep the window on top of the others and another little feature requested by someone :wink:

See first post for the updated download link

_________________
My Shapeways shop


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Forum powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group