In a recent support case, we were asked if sheet metal flat pattern info, specifically the flat pattern area, can be shown in a SOLIDWORKS drawing bill of material. After a little research it turns out that the answer is surprisingly yes and it’s not that difficult to achieve. So, you are probably asking yourself, “Where do you start?” Well, you first start by creating a drawing of your sheet metal assembly. See Figure 1 below. Next, we will add […]
Taking Advantage of SOLIDWORKS API in SOLIDWORKS CAM
How Do I Make My Feature Manager Design Tree When Using SOLIDWORKS CAM/CAMWorks Add-In? After engineering is completed on the SOLIDWORKS 3D CAD side of things your part needs to be programmed for manufacturing by using the seamless integration of SOLIDWORKS CAM and/CAMWorks. With SOLIDWORKS CAM activated inside SOLIDWORKS you may not be able to see all your CAM buttons. Taking the time to manually drag the edge of your SOLIDWORKS Feature Tree every time to make it wider can […]
Use Notepad++ to search API code
When you first begin programming for applications, the Internet is your friend, it is usually the fastest way to figure out how to write a section of code. Over time your own personal code library is going to grow. You would rather use code from your own library – you trust it. The problem is that it is usually easier to find code examples on the Internet than your own hard drive! I recommend trying the “Find in Files” function in Notepad++. [Notepad++ […]
Changing languages on drawings
I know companies that spend a lot of money translating drawings. Typically it is a slow, tedious, manual process. Since often times the translators aren’t engineers, you can sometimes get embarrassing translations. If your standard notes are blocks, translating these notes can be done very quickly. SOLIDWORKS’ blocks have a “FileName” property that a macro can easily change. Change the “FileName” property and the block immediately changes to the new block. So if you are clever about your block naming strategy, a […]
VBMsgeBoxResult
Most people only use Visual Basic’s Message Box as an “alert” tool – a way to pass information to the user. Did you know you could use it to pass information back to your macro? The SOLIDWORKS API class teaches you to declare a variable and set that variable equal to the value returned by MsgBox. Works great, now the button the user chooses (in this case either a “Yes” or “No” button (most likely in this case “Yes”)) will be stored in the “result” variable. […]
SetVar works with checked in files
My favorite new function in SOLIDWORKS Enterprise PDM 2013 -by far, is version free variables. (Special variables that can be updated on a datacard without having to bump the version of the file.) I’ll certainly be talking more about them later, but I just finished a quick test and couldn’t wait to tell you what I learned. I was initially worried because there is nothing in the API “What’s New” document mentioning any new functionality modifying version free variables. Turns […]
Interview with CADSharp
I don’t accept as many interview requests as I used to, but when Keith Rice from CADSharp contacted my publicist about doing an interview with him, I quickly sent my driver to deliver him to the ranch so we could meet. (I find the interview room much nicer in the ranch than over in the main estate.) Keith and I used to work together when he was here at 3DVision. Since we share many common interests we quickly became friends, thus I was sad […]
Auto Version Increment
Today’s SOLIDWORKS Enterprise PDM post comes from a cool little API idea Lou Gallo dropped on me: poInfo.mlAddInVersion = Now.ToString(“yyyyMMdd”) Just like the fight club, if I have to explain it, you wouldn’t understand.
Restricting your EPDM addin
There are a lot of API snobs out there who feel their SOLIDWORKS Enterprise PDM code is too good to be run by just anyone, perhaps only members of a certain user group are allowed to run their precious code. Perhaps they are writing something that should only be run by administrators. I personally am a programmer for the people; but if you are related to Marie Antoinette, it is pretty easy to accomplish this act of discrimation. You include […]
DSOFile beaten by SOLIDWORKS Document Manager
Hey macro lovers! Have to change a lot of SOLIDWORKS file properties, but don’t want to your code to have to open each file one at a time?