Hi all, my colleagueAmen Allah Jliliand I are exhibiting at SolidWorks World 2018 this year. As you might know, each year at SWW they hold a "model mania" contest where the fastest SolidWorks modelers can receive a prize. We wanted to do an equivalent "macro mania" and wanted your feedback on our rules and what you think would be reasonable SOLIDWORKS API programming puzzles for beginner and intermediate-level SOLIDWORKS API programmers.
Hi my friends , I have a excel file that contain two coloumn . The first one contain the X coordinates of points and the second one contain the Y coordinates.I want an VBA macro to create a matrix M1=[ n x1] wich contain all the X coordinates ( as described in the excel file) and onother matrix M2=[
Hi friends , I need a vba code that allow to get the inscribed circle of a irrugulat 2D sketch as shown in the figure in attachement.thank u After some reserach on the internet I found that the inscribed circle is calculated basing on the volronoi diagram and using the convex hull of a set of points.The set of points can be extracted directly from the sketch entities.After that its possible to draw the convex hull of the set points.Finally , the voronoi diagram should be used to get the maximun
I have a macro that prints all drawings from assembly components if they have one. Sometimes it doesn't find a drawing from a local workstation even if I know that there should be one. So my idea is to load drawings from vault and then process these. But don't have experience from SolidWorks PDM.
My current code is attached. I want to set an if statement, when the InStr function finds a specific line in the string swComp.Name2, set that parts configuration to, whichever one I want to. How would I do that?
I would like to apply a color to one of the faces of macro feature generated body. In the ISwComFeature::Regenerate callback, I use IFace2::SetMaterialPropertyValues2 to define a face color and then return generated bodies.
I need to perform all of these functions for each configuration in some large files. Is there any way to combine separate macros for these into one macro that will batch export the .STL files using the configuration names? I have used #TASK before, however I don't know how to combine their export to STL macro with other macros. Can anyone help me combine a different macros into one?
I have found on the internet one macro that I would like to improve. It opens up assembly and exports each part weight. In the end I would like to get macro which opens up assembly, then reads dimensions of part and export that information to excel. Main purpose of that would be knowing how much of different metal sheet would be needed to make the parts from assembly.
I'm starting to discover the Macros and I have a goal. I want to make a macro. I want that from a piece create a plane, I keep it in the same folder as the piece, and that plane automatically remove the three main views and a 3d and mark the maximum length, maximum width and maximum depth.
Anyone able to edit the macro below to save as pdf with current sheet revision (from drawing file properties)? Current macro saves the drawing as pdf, but uses "revision" from custom properties in the 3d model.
Using: swModel.FeatureManager.InsertConvertToSheetMetal2(0.005, False, True, 0.005, 0.001, swSheetMetalReliefTypes_e.swSheetMetalReliefTear, 0.5, 1, 0.5, False) The "FindBends" bit doesn't seems to work as getting the fold details and thickness too.
I am using driveworks for an assembly containing about twenty components. After outputting the new model, I would like to use a macro to delete all unshown configurations in the assembly. It would be nice if it could wipe out all unshown configurations at part level as well.....but I'd be happy if it at least worked at assembly level..........any help?
I need to Create Drawing and place views according to predefined view pallets using macro. I managed to create a drawing and place a views in drawing using attached Macro, but views are not placed at the view pallets with proper scaling as like task scheduler perform.
Hi everybody, I am currently working on MatLab-SolidWorks and I found that the code for creating a surface/fill is not working but I really need it. It's working for the extrusion operation, but when I save the macro for the function Surface/Fill, there is nothing. Look at the picture attached.
I'm fairly new to using design tables and have very limited knowledge of visual basic, but have experience with java so I'm not a completely lost cause here. I'm using a design table to define the suppression states of features in my model and the values of various dimensions within. Many of the dimension values and determined suppression states, are driven by simple IF Else IF functions in a module in visual basic.
I'm having an issue with IClosestDistance which getting called many times to get if 2 bodies are touching. When the model is heavy (large geometry), the call for that method is more frequent, and the issue is it crashes in a certain call whenever the user changes the active view (Rotating model, many clicks, ...).
Below is a section of a macro I amcurrencyworking that dependant up file type runs a save as. What I am looking to do after this section of code is to open the document that has been saved in order to make changes to the custom propertiesprogrammatically.
I have been trying to write a macro to update custom properties but am stuck because I have some properties that only exist at the Custom level and not in configurations. When using the AddCustomInfo3 method I see it is possible to specify the destination configuration but in this case I'm not sure what that is or if it even exists. If I leave it blank i.e.
Option Explicit Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Dim swCustProp As SldWorks.CustomPropertyManager Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc Set swCustProp = swModel.Extension.CustomPropertyManager("") 'Add config name in the quotes if you want configuration specific property swCustProp.Add3 "Description", 30, "Test 123", 1 ' Change property name as needed End Sub Great, that was the bit I was missing.