Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Showing sheet metal part’s description

Sleemery

New member
I'm fairly new at programming with SolidWorks API. I'm using vb.net 2005 and have created a form where users can load a list of sheet metal parts in a ListView for creating DXF files. What I would like to do is have the part's description (i.e. "Corner Post") appear in a ToolTip when a user selects a part from the list. Is there any code that can do this?


Thanks,


Shawn
 
hi SW API users,

I know how to do this, did you get the solution, if you really want this. I will help you

Thanks
KV
 
KV,


I have not found out how to do this yet, and am still very interested in learning this. Any help you can provide will be greatly appreciated.


Thanks,
Shawn
 
//Here you can get the description value from the custom
//properties. For this, you will need SolidWorks
//application.

sldworks.sldworks sldapp = new sldworks.sldworks();
sldapp.visible = true;
sldworks.ModelDoc2 swmodel =
(sldworks.ModelDoc2)sldapp.ActiveDoc;
string ConfigName = "";
string FieldName = "Description";
value = swmodel.GetCustomInfoValue(ConfigName,
FieldName);

//If you have the Swdocmanager assembly license, then you
//don't want to use SW application to get this custom
//properties information. **The code will be different


Edited by: kvchennai
 
After tweaking your code a little I was able to get it to work perfectly. That was exactly what I was looking for. Thank you for all your help!


Best Regards,
Shawn
 

Sponsor

Articles From 3DCAD World

Back
Top