I have two questions:
In a loded assembly
1) How to find out if the selected part is loaded as resolved or lightweight?
2) If loaded as lightweight, how to resolve only the selected part (not all of the lightweight parts)?
Thanks in advance!
Using Solidworks API (C#), I'd like to change the transparency of a lightweight part that is selected in an assembly. Here is the code that I am using up to where I get an error (last line):
ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;
SelectionMgr...
Thanks for your response. This sounds to be the right solution. Do you know how I can put a part in an assembly in Edit mode using API functions and also return it to the initial state (not Edit mode)?
Thanks in advance.
Thanks for all of the suggestions and comments.
The problem with suppress/unsuppress is that there maybe several parts in the main or sub assemblies that are already supprssed. Either I must record their name (which doesn't sound easy for me) to avoid unsuppressing them or I need to suppress...
I'd like to export only the selected part (in an assembly) as STL, but my code exports all of the parts as stl. Do you know how I can achieve this?
My code:
ModelDoc2 swModel = (ModelDoc2)swApp.ActiveDoc;
SelectionMgr swSelectionMgr =...
This was the first that I tried before posting in the forum. It is not there! transparent.png is different and is for edrawing and not Solidworks!
Here is what I am looking for (highlighted with arrow - as an example):
I also looked into lots of dll and exe files in SolidWorks Corp path, but...
Just a friendly notice that you do not have to respond IF you do not understand the question. I am looking for the location of the BUILT-IN icons used in Solidworks toolbar/menu and not how to change macro icon!!
Does anyone know where (what dll or exe) the built-in icons of Solidworks are saved? I have made an add-in and I'd like to use some of the built-in icons like "Change Transparency" in my add-in.
Thanks in advance.
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...
Thanks, may I ask what tool you used to find the parameters?
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...
I am wondering how you obtained the variables
Const WM_COMMAND As Long = 273
Const OPEN_IN_POSITION_CMD As Long = 52056
Do you have the list of command codes for Solidworks?
Thanks,