This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'www.bluebyte.biz | |
Public Enum swVerticalJustification_e | |
swVerticalJustificationNone = 0 | |
swVerticalJustificationBottom = 3 | |
swVerticalJustificationMiddle = 2 | |
swVerticalJustificationTop = 1 | |
End Enum | |
Public Enum swTextJustification_e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'All rights reserved to Blue Byte Systems Inc. - amen@bluebyte.biz | |
'Blue Byte LLC / Blue Byte Software does not provide any warranties for macros. | |
'Pre-conditions: BOM pre-selected. | |
'Results: BOM created in Excel with thumbnail preview | |
'define the width and height of the thumbnail | |
Dim Width As Long 'in pixels | |
Dim Height As Long 'in pixels | |
Dim swApp As Object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Delete all properties from the active configuration | |
' Conditions = None | |
' Results = all properties in the active configuration are deleted | |
' www.bluebyte.biz | |
Dim swApp As Object | |
Dim swModel As Object | |
Dim CustomPropertyManager As Object | |
Public Enum swDocumentTypes_e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Delete all dangling dimensions | |
' Conditions = Active document must be drawing | |
' Results = Dangling dimensions deleted | |
' www.bluebyte.biz | |
Dim swApp As Object | |
Dim swModel As Object | |
Dim swDraw As Object | |
Dim swSheet As Object | |
Dim swView As Object | |
Dim boolstatus As Boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Declare PtrSafe Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long | |
Public swApp As SldWorks.SldWorks | |
Public swModel As SldWorks.ModelDoc2 | |
Public swFeat As SldWorks.Feature | |
Public bRet As Boolean | |
Public Enum swCommands_Extended | |
swCommand_ParallelToScreen = 22159 | |
End Enum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static double[] CreateBoundingBox(this ModelDoc2 swModelDoc) | |
{ | |
string value; | |
string resolvedvalue; | |
double factor = 1000.0; | |
var ar = new List<double>(); | |
var lengtUnit = (swLengthUnit_e)swModelDoc.LengthUnit; | |
switch (lengtUnit) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnLoadAdditionalAssemblies(DirectoryInfo addinDirectory) | |
{ | |
var assembly = addinDirectory.GetFiles().ToList().FirstOrDefault(x => x.Name.StartsWith("Microsoft.WindowsAPICodePack")); | |
if (assembly != null) | |
System.Reflection.Assembly.LoadFrom(assembly.FullName); | |
assembly = addinDirectory.GetFiles().ToList().FirstOrDefault(x => x.Name.StartsWith("Microsoft.WindowsAPICodePack.Shell")); | |
if (assembly != null) | |
System.Reflection.Assembly.LoadFrom(assembly.FullName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string GetTitle2(this ModelDoc2 model) | |
{ | |
var extension = string.Empty; | |
if (model.GetType() == (int)swDocumentTypes_e.swDocPART) | |
extension = ".sldprt"; | |
else | |
extension = ".sldasm"; | |
var title = model.GetTitle(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim swApp As SldWorks.SldWorks | |
Dim swModel As ModelDoc2 | |
Dim swModelDocExtension As ModelDocExtension | |
Sub main() | |
Set swApp = Application.SldWorks | |
Set swModel = swApp.ActiveDoc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enum SheetMetalOptions_e | |
ExportFlatPatternGeometry = 1 | |
IncludeHiddenEdges = 2 | |
ExportBendLines = 4 | |
IncludeSketches = 8 | |
MergeCoplanarFaces = 16 | |
ExportLibraryFeatures = 32 | |
ExportFormingTools = 64 | |
ExportBoundingBox = 2048 | |
End Enum |
OlderNewer