Blog

Blog2023-10-15T01:29:24-04:00

What’s New in the 2018 SolidWorks API

SolidWorks 2018 was released over half a year ago, but it’s never too late to talk about the new enhancements in the SolidWorks API. Aside from covering new API calls, we will look at what is undoubtedly this version’s most notable upgrade: VSTA 2015. This lets programmers create .NET macros in Visual Studio instead of the lackluster VSTA editor.

New API Calls and Interfaces

Below is a list of the most notable API calls and interfaces added in SolidWorks 2018. You can see all additions and their related API calls in the Release Notes article in the API Help. You can find it in the local API Help by searching for “Release Notes” in the category tab. Note that the local API Help Release Notes will only be as up-to-date as the service pack you have downloaded.

I have bolded those API calls that I find particularly interesting. Those with an asterisk I could not find when I looked at the release notes.

  • Access general tolerance table annotations and features.
  • Work with hidden cells, rows, and columns in tables.
  • Add a distance mate between cylindrical components of an assembly.
  • Add rebuild and save marks to multiple configurations and remove them from all configurations.
  • Add specific display dimensions by type.
  • Create a spline constrained to a surface.
  • Create a trimmed sheet body with a specified tolerance.*
  • Create advanced assembly mates and sweeps.
  • Create advanced holes in parts.
  • Create bidirectional twist and thin-walled sweep features.
  • Create internal and external threads.
  • Handle pre- and post-notify events when converting bodies.
  • Import and export Hole Wizard and Toolbox data.
  • Modify control points and interior knots in sketch splines.
  • Offload PhotoView 360 rendering to other networked machines.
  • Optionally rebuild a model after adding configurations.
  • Quickly check whether an interference exists between components.
  • Save and restore the current SolidWorks settings. (Appears to mimic Copy Settings Wizard)
  • Advanced exploded view editing.
  • Set table anchors at selected sketch points on drawing sheets.
  • Show the preview of a configuration selected in the ConfigurationManager.
  • Edit third-party native CAD components in assemblies.*
  • Get corresponding objects between drawing views and parts or assemblies.
  • Get layer items by type.
  • Get or set a custom property builder template for parts or weldments.
  • Get or set whether to automatically rebuild equations.
  • Get or set whether to automatically repair files on opening.
Accessor Diagrams

New interfaces added this year not only have the typical accessor list you have come to expect but also a PDF that visually shows an interface’s accessors and the interfaces that it gives access to. At this point I don’t see myself using these very much, but perhaps others will find them helpful.

Important Updates to VSTA

VSTA (Visual Studio Tools for Applications) is the technology that allows you to create .NET macros. Previously you had to use the VSTA editor, which looked like a rudimentary version of Visual Studio but launched from SolidWorks like the VB Editor. I really despises the VSTA editor so I am pleased that creating .NET macros can now be done in Visual Studio. This change is possible because SolidWorks 2018 upgraded from VSTA 1.0 to VSTA 3.0 (also known as VSTA 2015). In the General tab of the System Settings, you can toggle between using VSTA 1.0 and 3.0 in 2018 and eventually only VSTA 3.0 will be available, therefore it is important to upgrade one’s .NET macros sooner rather than later.

Personally, I am still going to avoid .NET macros because its unclear whether the DLL stability issue that existed with VSTA 1.0 still exists in VSTA 3.0. I also have encountered numerous people who can’t get VSTA installed properly even though it is checked in the SolidWorks Installation Manager. Altogether, the hassle involved with VSTA isn’t worth it and I’d rather simply use VBA macros for testing and .NET stand-alones and addins for production. Nevertheless, if you end up using VSTA 3.0 with Visual Studio then please share your experience with us in the comments below.

To learn more about how to use VSTA 3.0, watch Daniel Seaman (SolidWorks API Tech Support Manager) deliver a presentation on the topic from SolidWorks World 2018. Steps to do this:

1. Visit the SolidWorks World 2018 agenda
2. Search the Sessions tab for the name “Seaman”
3. The result for “Upgrading SOLIDWORKS Macros to Visual Studio Tools for Applications 2015” should appear and you can click Watch Video on the right (requires a free account)

Context-Sensitive Help Viewer

According to the release notes: When you install SOLIDWORKS 2018, SOLIDWORKS and SOLIDWORKS enumerator context-sensitive helps are registered and integrated with the Help Viewer of the Visual Studio installed on your machine. After installing SOLIDWORKS 2018, configure Visual Studio to launch Help Viewer F1 help by selecting Help –> Help Preference –> Launch in Help Viewer.

To be honest, I haven’t figured out how to use this with Visual Studio Community 2017. If anyone has gotten it to work, let me know in the comments below. At this point its unclear to me if this saves that much time beyond simply creating a shortcut to apihelp.chm.

Workgroup PDM API No Longer Supported

As the title says, SolidWorks Corp is no longer offering technical support for the Workgroup PDM API since Workgroup PDM is no longer shipped with SolidWorks as of this version. Obviously the intent is to push all PDM users, even the small and mid-sized companies that Workgroup PDM was created for, toward SolidWorks PDM Standard or Professional (formerly Enterprise PDM).

Does anything we’ve covered stand out to you as particularly useful or exciting? If so then let us know in the comments!

Want to keep up with future CADSharp.com content and training events? Join our newsletter!

By |March 1st, 2018|0 Comments

Join Us At SolidWorks World 2018

We are excited to announce that we will presenting and exhibiting at SolidWorks World 2018 in Los Angeles, CA on Feb 4-7. If you’ve never been, I highly encourage you to attend this high-energy event that I like to describe as “one-third learning, one-third networking, and one-third party”. If you are a CADSharp customer or simply have an interest in the SolidWorks API, here’s some ways you can join us:

Beginner and Advanced API Presentations

Getting Serious with the SolidWorks API – Tuesday, Feb 6, 10:30 AM – 12:00 PM – Have you hit a ceiling in your API skills? Is your code a patchwork of recorded macros and other peoples’ code? Can you barely make sense of most API code? Using live examples, this session will take you take control of your code by demystifying the SOLIDWORKS API Object Model and the API Help.

Write a SolidWorks Addin From Scratch – Monday, Feb 5, 10:30 AM – 12:00 PM – Curious how professional developers create add-ins from the ground up? This hands-on session, which assumes attendees have at least a basic knowledge of object-oriented programming, will walk through DLL registration, hooking into SOLIDWORKS, menu creation, and debugging in Visual Studio.

Visit Our Exhibit Booth for Macro Mania!

Please visit us at Partner Pavilion booth 533, which is located in directly in the back of the hall near Model Mania. Our exhibit will feature customer case studies, upcoming product demos, and our own “Macro Mania”! The latter gives you opportunity to test your skills at writing a macro from scratch using only the SolidWorks API Help for reference. Top three finishers will receive an Amazon gift card.

Even if competition isn’t for you, please stop by to have a chat and learn about our upcoming products and events. For example, we will be unveiling “PMP Sandbox”, which is a tool that allows you to quickly generate PropertyManagerPages code (VBA, VB.NET, or C#) using a GUI.

Meet With Our Technical Director

If you have any interest in meeting with our Technical Director, Keith Rice, to talk about your automation needs, please email him and he’ll make sure he’s at the CADSharp booth at that time. Thanks and see you in LA!

Want to keep up with future content, training, and events like SolidWorks World? Join our monthly newsletter!

By |December 14th, 2017|0 Comments

Technical Support Now Available Via Slack

[quote author=”Austin A.”]I loved using [Slack for technical support], you guys were extremely fast with answering my questions and it was much easier than dealing with long email threads.[/quote]

One of the most valuable benefits of a CADSharp.com Power User membership is the on-demand technical support (SolidWorks API and SolidWorks PDM API) we provide to our customers. Previously this technical support was available only via email. As of today, we are now giving customers the option to ask questions and start discussions in CADSharp’s Slack. Below I’ll explain what this is and why you might consider using it.

What is Slack?

Slack is a communication tool that tries to take the best elements of email, Facebook, and forums and roll them into one. Companies use it so that its employees, contractors, and customers can communicate more efficiently. Communication occurs mostly in public or private “channels”. Private channels can only be seen and used by people specifically invited to those channels, whereas public channels can be seen and used by anyone in that Slack community.

A Slack account is free and can be used via web browser, desktop client, or mobile app. Personally, I prefer the desktop client, which I can hide in the Windows system tray while it is running.

Why use our Slack instead of email?

While Slack might seem like just another tool to keep track of and remember a password for, it has several benefits that make it superior to getting tech support versus email:

1. Every CADSharp.com team member can instantly see your issue. As a result, you’re going to get help MUCH more quickly than if the issue must be funneled through me first.

2. You can see and search the history of all CADSharp tech support inquiries. This means that the entire CADSharp.com community is benefiting from everyone else.

3. Uploading images, files, and code snippets is MUCH easier through Slack than through email. Trust me, you’ll fall in love with the user interface. No more worries about file attachment size or email destroying your code’s formatting.

4. Slack keeps discussions organized in threads, just like in a forum. No more archiving messy email chains or accidentally deleting or losing the info you need.

What happens when my Power User membership expires?

Nothing, actually. We don’t kick you from our Slack, we just ask that you refrain from creating new questions and discussions until you renew your membership. You can still respond to other people’s questions, of course.

Show me the money!

Here are three examples of questions that were asked and answered within a single business day, with replies provided by several CADSharp team members:

You’ve no doubt heard the saying, “Too good to be true.” We’re proving that adage wrong right now and we’re incredibly excited about it. Join hundreds of other satisfied Power User members today and start getting on-demend tech support from the best SolidWorks API minds in the world!

Keith

Want to keep up with new training events, blog posts, code snippets and more? Sign up for our newsletter.

By |December 4th, 2017|0 Comments
Go to Top