Blog 9.25.2012 4 Comments

Unless you’re a die-hard SolidWorks enthusiast that gobbles up the first beta release, chances are you haven’t seen SolidWorks 2013 or are just beginning to explore your freshly downloaded pre-release copy. As with any new releases, SolidWorks 2013 contains some great new “Top Enhancements” to increase design productivity. If you haven’t already, I’d encourage you to watch this short video covering those. Likewise, the SolidWorks API receives its own enhancements each year. Let’s check out some of the most significant.

Microsoft VBA support for 64-bit operating systems

Thank you, Microsoft. This one, my friends, is long overdue. Since VBA in previous versions was a 32-bit process, it could not run in the same thread as 64-bit SolidWorks. This created an annoyance when implementing user forms into one’s VBA macros that resulted in the user form appearing BEHIND the SolidWorks application window rather than in front. Fixing the problem required adding a significant amount of code to your sub-procedure. Say goodbye to this headache in 2013!

This upgrade to VBA is also significant because it proves that VBA is still important to Microsoft. Our SolidWorks VBA macros will remain functional for a long, long time. Indeed, this update to VBA isn’t a mere patching of existing version of VBA but an entirely new version called VBA 7.0. When you use the SolidWorks 2013 VB Editor you’ll also notice a slight facelift to the user interface. Nothing amazing, but at least it looks less like something straight out of 1995.

Notable new API interfaces and calls
  • SolidWorks Costing now includes an API. Use IModelDocExtension::GetCostingManager to return the ICostManager interface.
  • SolidWorks Sustainability now includes an API. Use IModelDocExtension::GetSustainability to return the ISustainabilityApp interface.
  • Insert cosmetic weld beads and access their feature data. See ICosmeticWeldBeadFeatureData, ICosmeticWeldBeadFolder, and IFeatureManager::InsertCosmeticWeldBead.
  • Create a forming tool feature with a point of insertion. See IFeatureManager::CreateFormTool2.
  • Get or set whether to apply the appearance of material. See IMaterialVisualPropertiesData::ApplyAppearance.
  • Copy appearances to the clipboard and apply them to faces, features, bodies, components, and parts. See ISldWorks::CopyAppearance and ISldWorks::PasteAppearance.
  • Create a conic curve in the active sketch. See ISketchManager::CreateConic.
  • More options for background processing large drawings that require significant time to open, including new event notifications for when the processing is complete. See IDrawingDoc::BackgroundProcessingOption, DSldWorksEvents::BackgroundProcessingEndNotifyEventHandler, and DSldWorksEvents::BackgroundProcessingStartNotifyEventHandler.
  • Handle drawing sheet activation events. See DDrawingDocEvents::ActivateSheetPostNotifyEventHandler and DDrawingDocEvents::ActivateSheetPreNotifyEventHandler.
  • Get or set the state of the flyout FeatureManager design tree. See IModelDocExtension::FlyoutFeatureTreeVisibility.
  • Make a component virtual by saving it in an assembly. See IComponent2::MakeVirtual.
  • Vary individual instances of linear and circular feature patterns. See IFeatureManager::FeatureLinearPattern3, IFeatureManager::FeatureCircularPattern4, and IFeatureManager::InsertVaryInstanceIncrement, IFeatureManager::InsertVaryInstanceOverride.
  • Get the unique name of a section view. See IView::GetUniqueName.
  • More control over component visibility in Large Design Review mode. See IAssemblyDoc::LargeDesignReviewTransparencyLevel, IAssemblyDoc::LargeDesignReviewTransparencyLevelDynamic, and IAssemblyDoc::LargeDesignReviewTransparencyLevelEnabled.
  • Display notes as water-marks in drawings. See INote::BehindSheet.
  • Insert a note that contains all of the cut list item properties of a sheet metal part. See IView::InsertCutListPropertyNote.
  • Access the centers of mass in a drawing view. See ICenterOfMass.
  • Insert Center of Mass reference geometry and Center of Mass Reference Points. See IFeatureManager::InsertCenterOfMass and IFeatureManager::InsertCenterOfMassReferencePoint.
  • Create multiple exploded views of an assembly. See IAssemblyDoc::CreateExplodedView.
  • Convert views to sketches and blocks. See IView::InsertViewAsBlock, IView::ReplaceViewWithSketch, and IView::ReplaceViewWithBlock.
  • Get the sheet metal folder feature from sheet metal models created in SolidWorks 2013 or later. See IModelDocExtension::GetTemplateSheetMetal. For SolidWorks 2012 and earlier, continue using ISheetMetalFeatureData.
  • Create a 3D bounding box for a cut list item in a weldment part. See IModelDocExtension::Create3DBoundingBox.

You can view the entire list of new functionality here.

Easter eggs
  • The swSelectType_e enumeration page now has the corresponding integer values in the Description column, making it much easier to figure out what object type ISelectionMgr::GetSelectedObject6 is returning.

The new appearance-related functionality and event notifications are welcome additions. What new functionality stands out to you?

Onward into a 64-bit world,
Keith

Want to keep up with future CADSharp.com content, webinars, and special offers? Sign up for our newsletter.


4 Comments

  1. Thanks for the update! The new VB editor sounds interesting.

  2. Ooo! They are making the enumerations more visible again?! They’ve been “hidden” for years! Nice.

  3. scott_high@hotmail.com

    I agree. Putting that much energy into updating VBA indicates a strong commitment from Microsoft and utilizing it in SolidWorks shows a commitment from Dassault to give their customers new tools to be more productive through automation.

Questions and Comments

You must be logged in to post a comment.