Hi,
I am keen to know about how I can load Solidworks in invisible mode, to perform several query operations on a model in invisible mode?
I hope there might be an option in Solidworks, which can load Solidworks session withour loading UI.
Thanks in advance,
Sachin Mahajan
SolidworksApi macros
Depends on what exactly you want to do while SW is invisible.
I mostly use document manager.
2016 SOLIDWORKS API Help - Welcome
You can hide the SW through SldWorks::Visible = False also, but i dont recommend it.
Omkar
Hi Omkar,
Thanks for your reply. I am actually looking for following steps through API.
1. Load Solidworks session in invisible mode.
2. Load xyz part in the above invisible session.
3. Get mass properties of the model and print them to a file.
4. Close model and session both.
Can you guide me how can get started with step 1 and 2?
- Sachin
Use documentmanager instead of solidworks as Mr Omkar mentioned
2016 SOLIDWORKS API Help - GetMassProperties Method (ISwDMConfiguration)
by running Process.Start(SolidworksFileName) it will launch solidworks up in the background. until you call Swapp.Visible=true it will be invisible by default.
if a current running session exists, there is a way to launch it in its own session, but i cant remember how.
You're obviously talking about this https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.getactiveobject(v=vs.110).aspx