Open "Part in Position" using API
Open "Part in Position" using API
(OP)
I'd like to open a part similar to "Open in Position" using API. I am able to open a part, but the view is not the same at it is in assembly.
Do you know how I can do this?
Thanks in advance.
Do you know how I can do this?
Thanks in advance.






RE: Open "Part in Position" using API
You can try this example: https://cloud.centralinnovation.com.au/sharpcode/i...
Thanks,
Atrem
RE: Open "Part in Position" using API
So it is not possible to do it withou using Windows API? I'd like to know if there is a way to do it with only Solidworks APIs?
Thanks
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API
I appreciate if you can post an example or link for this.
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API
I am wondering how you obtained the variables
CODE --> vb
Do you have the list of command codes for Solidworks?
Thanks,
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API
I am using Spy++ and this is the code that I am getting for "Open in Position" command:
<006733> 0000000000070C14 P WM_COMMAND wNotifyCode:0 (sent from a menu) wID:52056
when I select property, it shows this windows:
From the code I can get the OPEN_IN_POSITION_CMD=52056, but I don't know what is WM_COMMAND. I tried 111, but it only highlights the whole part.
Please let me know.
Thanks
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API
I was trying the code you kindly shared here that changes the view of the opened part to the view of the assembly. It works, but it firsts opens the part that is in another view and then changes the view. So basically you see the changes of the views. I am wondering if there is any way to open the part and update the view and then show/activate it?
Thank you again.
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API
RE: Open "Part in Position" using API