Skip to content

Instantly share code, notes, and snippets.

View AmenJlili's full-sized avatar
🚀
Growth!

Amen Jlili AmenJlili

🚀
Growth!
View GitHub Profile
@AmenJlili
AmenJlili / ParallelToScreen
Created August 4, 2021 03:56
Create_Plane_using_Command_Parallel_To_Screen_Command
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
@AmenJlili
AmenJlili / Delete_all_dangling_dimensions.vb
Last active November 21, 2020 21:00
Delete all dangling dimensions from active drawing document
' 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
@AmenJlili
AmenJlili / delete_properties_configuration.vb
Created August 4, 2020 01:55
Delete all properties for the active configuration – SOLIDWORKS MACRO
' 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
@AmenJlili
AmenJlili / save_bom_as_xlsx_with_thumbnails.vb
Last active March 18, 2023 17:21
SOLIDWORKS VBA Macro to save selected BOM as Excel with thumbnails
'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
'www.bluebyte.biz
Public Enum swVerticalJustification_e
swVerticalJustificationNone = 0
swVerticalJustificationBottom = 3
swVerticalJustificationMiddle = 2
swVerticalJustificationTop = 1
End Enum
Public Enum swTextJustification_e