I am confused as to why I am getting a type mismatch here. Any insight would be greatly appreciated.
-------
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
MsgBox IsPartOpen(swApp)...
I am at a loss to explain why the following does not work. GetCurrentSheet is not getting the sheet even though that sheet is active. Any ideas? Thanks for your help.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDraw As SldWorks.DrawingDoc
Dim swSheet As SldWorks.Sheet...
Here is what I'd like to do: run through every face in the visible bodies. If a face is blue (B = 1) then mark it. Once all faces have been traversed, select all marked faces.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swPart As SldWorks.PartDoc
Dim swBody As Variant...
Hi,
The mate references in "screw.sldprt" are set up in a fairly sensible fashion, and yet when I drag them onto a hole in the assembly they are not recognized. Sometimes I can switch the order and get the face to recognize a coincident mate, but I'm trying to get the "drop in hole" mate icon...
Is there no way to get a reference dimension in a design table? Basically I have want to include the dimension of a flat plattern in my design table, save out this design table, and then insert it into my drawing as a linked object. That way when my model changes the flat pattern length changes...
Hi,
Having trouble applying this library feature to most faces. Try creating a 4x4x4 cube and then inserting the lib feature on each face. I can only get it to work on 2 of the faces. The rest it either comes in at the wrong orientation or errors out before it's even added. I assume that the...
What happens if I enter an angle between two angles in the table? Does it interpolate? I know it does for the thicknessees.
What if I enter an angle in the table that is above the max value or below the min value? If the max listed is 90 degrees, what happens if I type in 110 degrees?
What...
I have heard that its possible to display the dimensions (markup comments) on the part each time it pauses during the continuous play. Anyone familiar with this? I've been playing around and no luck. Thanks.
Open up this part and between the two configurations. You'll notice the warning that pops up in one because the sketch is no longer in the right place. But why? The sketch was created using convert entities---shouldn't it remain in that channel? So either I'm seriously misunderstanding...
Take a look at the attached image. Is there a way to make the fillet bead uniform around the intersection? Any idea why SW chose to create the fillet bead like it did? Thanks.
In SW Explorer I would like to know how to make the Description custom prop of the part as a label. (By label I mean the column headers in the right side windows: Name, Size, Type, Date Modified, etc.)
In Options-->Label tab you will see, at the bottom, "Choose 1 custom property to display"...
The following code fails to open a part in SW Viewer. It opens the Viewer, but the OpenDoc6 method doesn't seem to work. Any ideas? Thanks.
========
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim part As ModelDoc2
Dim longstatus As Long, longwarnings As Long
Sub main()
'Set swApp =...
In the external reference search order, the second priority for SW is to look in a folder specified in Options. Both the Help file and the 2009 Essentials manual say that this is found under File Locations-->Folders. The problem is that "Folders" doesn't exist in the File Locations list. I see...
Hello,
Let's say I have a drawing with a title block that will give the weight of the entire assembly as well as several of the parts. I want this title block to be filled in automatically using the custom properties from the assy and parts. How do I tell the title block to reference the custom...
When automatic cut list generation is turned on it creates its own folders and then puts the cut list items in some arbitrary order. But I want to decide the order. Since the order is dependent on the folder order, I have to get rid of all of the folders and make my own. But in order to do that...
Is there no way, when entering data in the title block, to get the text to resize either automatically (like in AutoCAD) or using a button like "Fit Text"? The latter button only works in notes, apparently. Seems like this functionality would have been implemented by now but I can't find...
When I record a macro that involves me selecting lines, edges, faces, etc the macro includes the "selectbyid2" member. The problem with this member is that it selects based on X Y Z location and not by a name. So if I try to run the macro again with an entity in a slightly different location the...
I am trying to create SolidWorks models of sockolet fittings.
First, I cannot even find a basic definition for a "sockolet." I am assuming this is sort for "socket outlet", which is used to create an outlet in straight pipe where one did not exist before. (Any elaboration or correction is...
The fittings catalog I have gives the following hub diameter for a 1/4" elbow for use with standard/sch. 40 pipe:
B = 0.90625
B is shown here:
http://www.bonneyforge.com/images/specs/fu-24a.gif
I should be able to get the outer diameter of the hub by multiplying the wall thickness by 2 and...
Run the code below with a sketch in the X-Y plane open. Select all of the points and note how many were created. Now, delete the points, zoom in a little, and run the macro again. Note that the macro creates many more points this time.
SW prevents the macro from creating points that overlap one...