Skip to content

Commit 1c7f1fc

Browse files
committed
See release_notes.md
1 parent 3d7c505 commit 1c7f1fc

13 files changed

Lines changed: 487 additions & 10 deletions

File tree

AssemblyReport/AssemblyReport.vbs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
' Command Line Arguments for Report.exe
2+
' https://docs.plm.automation.siemens.com/docs/se/2020/api/webframe.html
3+
4+
' VB Script String Functions
5+
' https://www.w3schools.com/asp/asp_ref_vbscript_functions.asp
6+
7+
Set oApp = GetObject(, "SolidEdge.Application")
8+
Set oDocs = oApp.Documents
9+
Set oDoc = oDocs.Item(1)
10+
11+
Dim ProgramName
12+
Dim AssemblyFile
13+
Dim ReportType
14+
Dim ReportFile
15+
Dim Cmd
16+
17+
ProgramName = "C:\Program Files\Siemens\Solid Edge 2021\Program\report.exe"
18+
AssemblyFile = oDoc.FullName
19+
ReportType = "ASM_ATOMIC_PARTS" ' See options in the Command Line Arguments link.
20+
ReportFile = Replace(AssemblyFile, ".asm", ".txt")
21+
22+
Cmd = Chr(34) & ProgramName & Chr(34) & _
23+
" " & AssemblyFile & _
24+
" /t=" & ReportType & _
25+
" /o=" & ReportFile & _
26+
" /w=FALSE"
27+
28+
Set WshShell = WScript.CreateObject("WScript.Shell")
29+
30+
Dim StatusCode
31+
32+
StatusCode = WshShell.Run(Cmd, 1, true)
33+
34+
set oApp = Nothing
35+
set oDocs = Nothing
36+
set oDoc = Nothing

AssemblyReport/Readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Assembly Report
2+
3+
## Credit @wku for figuring out where Chr(34) is NOT used.
4+
5+
Illustrates how to run the command line tool, report.exe, from a VB Script.

AssemblyReport/defaults.txt

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
TextBoxStatus=773 files found
2+
ComboBoxFileSearch=
3+
TextBoxFontSize=10
4+
CheckBoxFileSearch=False
5+
CheckBoxFilterDft=True
6+
CheckBoxFilterPsm=True
7+
CheckBoxFilterPar=True
8+
CheckBoxFilterAsm=True
9+
TextBoxTopLevelAssembly=D:\CAD\scripts\test_files\test_deadwood_3\top_level.asm
10+
TextBoxColumnWidth=8
11+
TextBoxInputDirectory=D:\Projects\20200629_carton_packer\7477-00000_carton_packer
12+
TextBoxSaveAsFormulaAssembly=
13+
CheckBoxSaveAsFormulaAssembly=False
14+
TextBoxExposeVariablesAssembly=
15+
TextBoxFindReplaceReplaceAssembly=20040201
16+
TextBoxFindReplaceFindAssembly=19990101
17+
TextBoxFindReplacePropertyNameAssembly=hmk_Part_Number
18+
ComboBoxFindReplacePropertySetAssembly=Custom
19+
TextBoxExternalProgramAssembly=D:\CAD\scripts\HousekeeperExternalPrograms\AssemblyReport\AssemblyReport.vbs
20+
ComboBoxSaveAsAssemblyFileType=jpg (*.jpg)
21+
CheckBoxSaveAsAssemblyOutputDirectory=False
22+
TextBoxSaveAsAssemblyOutputDirectory=D:\CAD\scripts\SolidEdgeHousekeeper\bin\Release
23+
TextBoxSaveAsFormulaPart=
24+
CheckBoxSaveAsFormulaPart=False
25+
TextBoxExposeVariablesPart=PhysicalProperties_Density, Mass
26+
TextBoxFindReplaceReplacePart=POPLAR
27+
TextBoxFindReplaceFindPart=WALNUT
28+
TextBoxFindReplacePropertyNamePart=Material
29+
ComboBoxFindReplacePropertySetPart=System
30+
TextBoxExternalProgramPart=D:\CAD\scripts\HousekeeperExternalPrograms\AddRemoveCustomProperties\bin\Release\AddRemoveCustomProperties.exe
31+
ComboBoxSaveAsPartFileType=Step (*.stp)
32+
CheckBoxSaveAsPartOutputDirectory=False
33+
TextBoxSaveAsPartOutputDirectory=D:\Projects\shop\20220617_drill_press_clamp\20220624_mallonee_files
34+
TextBoxSaveAsFormulaSheetmetal=
35+
CheckBoxSaveAsFormulaSheetmetal=False
36+
TextBoxExposeVariablesSheetmetal=Flat_Pattern_Model_CutSizeX, Flat_Pattern_Model_CutSizeY, Mass
37+
TextBoxFindReplaceReplaceSheetmetal=20040201
38+
TextBoxFindReplaceFindSheetmetal=19990101
39+
TextBoxFindReplacePropertyNameSheetmetal=hmk_Part_Number
40+
ComboBoxFindReplacePropertySetSheetmetal=Custom
41+
TextBoxExternalProgramSheetmetal=D:\CAD\scripts\HousekeeperExternalPrograms\AddRemoveCustomProperties\bin\Release\AddRemoveCustomProperties.exe
42+
ComboBoxSaveAsSheetmetalFileType=jpg (*.jpg)
43+
CheckBoxSaveAsSheetmetalOutputDirectory=False
44+
TextBoxSaveAsSheetmetalOutputDirectory=D:\CAD\scripts\SolidEdgeHousekeeper\bin\Release
45+
TextBoxSaveAsFormulaDraft=
46+
CheckBoxSaveAsFormulaDraft=False
47+
TextBoxWatermarkFilename=D:\CAD\scripts\test_files\ant.jpg
48+
TextBoxWatermarkScale=.25
49+
TextBoxWatermarkY=0.25
50+
TextBoxWatermarkX=0.9
51+
CheckBoxWatermark=False
52+
TextBoxExternalProgramDraft=D:\CAD\scripts\HousekeeperExternalPrograms\AddRemoveCustomProperties\bin\Release\AddRemoveCustomProperties.exe
53+
ComboBoxSaveAsDraftFileType=PDF (*.pdf)
54+
CheckBoxSaveAsDraftOutputDirectory=False
55+
TextBoxSaveAsDraftOutputDirectory=D:\CAD\scripts\SolidEdgeHousekeeper\bin\Release
56+
CheckBoxSaveAsImageCrop=False
57+
CheckBoxBackgroundProcessing=True
58+
CheckBoxRunExternalProgramSaveFile=False
59+
RadioButtonPictorialViewTrimetric=True
60+
RadioButtonPictorialViewDimetric=False
61+
RadioButtonPictorialViewIsometric=False
62+
CheckBoxPrintOptionsScaleLineWidths=False
63+
CheckBoxPrintOptionsScaleLineTypes=False
64+
CheckBoxPrintOptionsPrintAsBlack=False
65+
CheckBoxPrintOptionsBestFit=True
66+
CheckBoxPrintOptionsAutoOrient=True
67+
TextBoxPrintOptionsCopies=1
68+
TextBoxPrintOptionsHeight=8.5
69+
TextBoxPrintOptionsWidth=11
70+
TextBoxPrintOptionsPrinter=HP Color LaserJet M254dw (544B0F)
71+
CheckBoxRememberTasks=False
72+
CheckBoxMoveDrawingViewAllowPartialSuccess=True
73+
TextBoxFastSearchScopeFilename=
74+
CheckBoxTLAReportUnrelatedFiles=True
75+
RadioButtonTLATopDown=True
76+
RadioButtonTLABottomUp=False
77+
CheckBoxWarnSave=False
78+
TextBoxRestartAfter=500
79+
TextBoxPartNumberPropertyName=hmk_Part_Number
80+
ComboBoxPartNumberPropertySet=Custom
81+
TextBoxActiveMaterialLibrary=C:\Program Files\Siemens\Solid Edge 2021\Preferences\Materials\hmk_Materials.mtl
82+
TextBoxTemplateAssembly=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\ansi inch assembly.asm
83+
TextBoxTemplatePart=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\ansi inch part.par
84+
TextBoxTemplateSheetmetal=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\ansi inch sheet metal.psm
85+
TextBoxTemplateDraft=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\Hallmark_B.dft
86+
Assembly.Open/Save=Unchecked
87+
Assembly.Activate and update all=Unchecked
88+
Assembly.Property find replace=Unchecked
89+
Assembly.Expose variables missing=Unchecked
90+
Assembly.Expose variables=Unchecked
91+
Assembly.Remove face style overrides=Unchecked
92+
Assembly.Update face and view styles from template=Unchecked
93+
Assembly.Hide constructions=Unchecked
94+
Assembly.Fit pictorial view=Unchecked
95+
Assembly.Part number does not match file name=Unchecked
96+
Assembly.Missing drawing=Unchecked
97+
Assembly.Broken links=Unchecked
98+
Assembly.Links outside input directory=Unchecked
99+
Assembly.Failed relationships=Unchecked
100+
Assembly.Underconstrained relationships=Unchecked
101+
Assembly.Run external program=Checked
102+
Assembly.Interactive edit=Unchecked
103+
Assembly.Save as=Unchecked
104+
Part.Open/Save=Unchecked
105+
Part.Property find replace=Unchecked
106+
Part.Expose variables missing=Checked
107+
Part.Expose variables=Unchecked
108+
Part.Update face and view styles from template=Unchecked
109+
Part.Update material from material table=Unchecked
110+
Part.Hide constructions=Unchecked
111+
Part.Fit pictorial view=Unchecked
112+
Part.Update insert part copies=Unchecked
113+
Part.Broken links=Unchecked
114+
Part.Part number does not match file name=Unchecked
115+
Part.Missing drawing=Unchecked
116+
Part.Failed or warned features=Unchecked
117+
Part.Suppressed or rolled back features=Unchecked
118+
Part.Underconstrained profiles=Unchecked
119+
Part.Insert part copies out of date=Unchecked
120+
Part.Material not in material table=Unchecked
121+
Part.Run external program=Unchecked
122+
Part.Interactive edit=Unchecked
123+
Part.Save As=Unchecked
124+
Sheetmetal.Open/Save=Unchecked
125+
Sheetmetal.Property find replace=Unchecked
126+
Sheetmetal.Expose variables missing=Checked
127+
Sheetmetal.Expose variables=Unchecked
128+
Sheetmetal.Update face and view styles from template=Unchecked
129+
Sheetmetal.Update material from material table=Unchecked
130+
Sheetmetal.Hide constructions=Unchecked
131+
Sheetmetal.Fit pictorial view=Unchecked
132+
Sheetmetal.Update insert part copies=Unchecked
133+
Sheetmetal.Update design for cost=Unchecked
134+
Sheetmetal.Broken links=Unchecked
135+
Sheetmetal.Part number does not match file name=Unchecked
136+
Sheetmetal.Missing drawing=Unchecked
137+
Sheetmetal.Failed or warned features=Unchecked
138+
Sheetmetal.Suppressed or rolled back features=Unchecked
139+
Sheetmetal.Underconstrained profiles=Unchecked
140+
Sheetmetal.Insert part copies out of date=Unchecked
141+
Sheetmetal.Flat pattern missing or out of date=Unchecked
142+
Sheetmetal.Material not in material table=Unchecked
143+
Sheetmetal.Run external program=Unchecked
144+
Sheetmetal.Interactive edit=Unchecked
145+
Sheetmetal.Save As=Unchecked
146+
Draft.Open/Save=Unchecked
147+
Draft.Update drawing views=Unchecked
148+
Draft.Update styles from template=Unchecked
149+
Draft.Update drawing border from template=Unchecked
150+
Draft.Fit view=Unchecked
151+
Draft.File name does not match model file name=Unchecked
152+
Draft.Broken links=Unchecked
153+
Draft.Drawing views out of date=Unchecked
154+
Draft.Detached dimensions or annotations=Unchecked
155+
Draft.Parts list missing or out of date=Unchecked
156+
Draft.Run external program=Unchecked
157+
Draft.Interactive edit=Unchecked
158+
Draft.Print=Unchecked
159+
Draft.Save As=Unchecked

AssemblyReport/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## v 0.1.0
2+
Initial release
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
' Author @Derek G
2+
' https://community.sw.siemens.com/s/question/0D54O00007VUmLKSA1/can-you-do-a-macro-that-unlinks-variables-attached-to-an-excel-workbook
3+
4+
5+
Set oApp = GetObject(, "SolidEdge.Application")
6+
Set oDocs = oApp.Documents
7+
Set oDoc = oDocs.Item(1)
8+
9+
Set variables = oDoc.variables
10+
For i = 1 To variables.count Step 1
11+
If InStr(variables(i).Formula, ".xlsx") Then
12+
variables(i).Formula = ""
13+
End If
14+
Next
15+
Set dimensions = variables.Query("*", 2, 1)
16+
For i = 1 To dimensions.count Step 1
17+
If InStr(dimensions(i).Formula, ".xlsx") Then
18+
dimensions(i).Formula = ""
19+
End If
20+
Next
21+
22+
set oApp = Nothing
23+
set oDocs = Nothing
24+
set oDoc = Nothing
25+
Set variables = Nothing
26+
Set dimensions = Nothing

BreakExcelLinks/Readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Break Excel Links
2+
3+
## Author: @Derek G
4+
5+
Illustrates how to automate Solid Edge with a VB Script.

BreakExcelLinks/defaults.txt

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
TextBoxStatus=65 files found
2+
TextBoxFontSize=10
3+
TextBoxFileSearch=????-?????[!-]*.*
4+
CheckBoxFileSearch=False
5+
CheckBoxFilterDft=True
6+
CheckBoxFilterPsm=True
7+
CheckBoxFilterPar=True
8+
CheckBoxFilterAsm=True
9+
TextBoxTopLevelAssembly=D:\CAD\scripts\test_files\20181212_auto_cube_fill\7481 AUTO CUBE FILL 2021\7481-50000_GRIPPER\7481-50000_gripper.asm
10+
TextBoxColumnWidth=8
11+
TextBoxInputDirectory=D:\CAD\scripts\test_files\20181212_auto_cube_fill\7481 AUTO CUBE FILL 2021\7481-50000_GRIPPER
12+
TextBoxFindReplaceReplaceAssembly=FRED
13+
TextBoxFindReplaceFindAssembly=joe
14+
TextBoxFindReplacePropertyNameAssembly=hmk_Engineer
15+
ComboBoxFindReplacePropertySetAssembly=Custom
16+
TextBoxExternalProgramAssembly=D:\CAD\scripts\HousekeeperExternalPrograms\BreakExcelLinks\BreakExcelLinks.vbs
17+
ComboBoxSaveAsAssemblyFileType=jpg (*.jpg)
18+
CheckBoxSaveAsAssemblyOutputDirectory=False
19+
TextBoxSaveAsAssemblyOutputDirectory=D:\CAD\scripts\test_files\save_as_jpg
20+
TextBoxFindReplaceReplacePart=TGP SHAFTING STAINLESS
21+
TextBoxFindReplaceFindPart=TGP SHAFTING STAINLESSing
22+
TextBoxFindReplacePropertyNamePart=Material
23+
ComboBoxFindReplacePropertySetPart=System
24+
TextBoxExternalProgramPart=D:\CAD\scripts\HousekeeperExternalPrograms\BreakExcelLinks\BreakExcelLinks.vbs
25+
ComboBoxSaveAsPartFileType=STL (*.stl)
26+
CheckBoxSaveAsPartOutputDirectory=False
27+
TextBoxSaveAsPartOutputDirectory=D:\Projects\20181212_auto_cube_fill\7481 AUTO CUBE FILL 2021\VENDOR_FILES_3DPRINT
28+
TextBoxFindReplaceReplaceSheetmetal=STAINLESS
29+
TextBoxFindReplaceFindSheetmetal=Stainless steel
30+
TextBoxFindReplacePropertyNameSheetmetal=Material
31+
ComboBoxFindReplacePropertySetSheetmetal=System
32+
CheckBoxSaveAsFlatDXFOutputDirectory=False
33+
TextBoxSaveAsFlatDXFOutputDirectory=D:\Projects\20181212_auto_cube_fill\7481 AUTO CUBE FILL 2021\VENDOR_FILES_LASER
34+
TextBoxExternalProgramSheetmetal=D:\CAD\scripts\HousekeeperExternalPrograms\BreakExcelLinks\BreakExcelLinks.vbs
35+
ComboBoxSaveAsSheetmetalFileType=jpg (*.jpg)
36+
CheckBoxSaveAsSheetmetalOutputDirectory=False
37+
CheckBoxLaserOutputDirectory=False
38+
TextBoxSaveAsSheetmetalOutputDirectory=D:\CAD\scripts\test_files\save_as_jpg
39+
TextBoxLaserOutputDirectory=D:\CAD\scripts\SolidEdgeHousekeeper\bin\Release
40+
TextBoxWatermarkFilename=D:\CAD\scripts\test_files\ant.jpg
41+
TextBoxWatermarkScale=0.5
42+
TextBoxWatermarkY=0.3
43+
TextBoxWatermarkX=0.9
44+
CheckBoxWatermark=False
45+
TextBoxExternalProgramDraft=D:\CAD\scripts\HousekeeperExternalPrograms\FitIsoView\bin\Release\FitIsoView.exe
46+
ComboBoxSaveAsDraftFileType=PDF (*.pdf)
47+
CheckBoxSaveAsDraftOutputDirectory=False
48+
TextBoxSaveAsDraftOutputDirectory=D:\Projects\20181212_auto_cube_fill\7481 AUTO CUBE FILL 2021\VENDOR_FILES_LASER
49+
CheckBoxRunExternalProgramSaveFile=False
50+
RadioButtonPictorialViewTrimetric=False
51+
RadioButtonPictorialViewDimetric=False
52+
RadioButtonPictorialViewIsometric=True
53+
CheckBoxPrintOptionsScaleLineWidths=False
54+
CheckBoxPrintOptionsScaleLineTypes=False
55+
CheckBoxPrintOptionsPrintAsBlack=False
56+
CheckBoxPrintOptionsBestFit=True
57+
CheckBoxPrintOptionsAutoOrient=True
58+
TextBoxPrintOptionsCopies=1
59+
TextBoxPrintOptionsHeight=8.5
60+
TextBoxPrintOptionsWidth=11
61+
TextBoxPrintOptionsPrinter=HP Color LaserJet M254dw (544B0F)
62+
CheckBoxRememberTasks=False
63+
CheckBoxMoveDrawingViewAllowPartialSuccess=True
64+
TextBoxFastSearchScopeFilename=
65+
CheckBoxTLAReportUnrelatedFiles=True
66+
RadioButtonTLATopDown=True
67+
RadioButtonTLABottomUp=False
68+
CheckBoxWarnSave=False
69+
TextBoxRestartAfter=500
70+
TextBoxPartNumberPropertyName=hmk_Part_Number
71+
ComboBoxPartNumberPropertySet=Custom
72+
TextBoxActiveMaterialLibrary=C:\Program Files\Siemens\Solid Edge 2021\Preferences\Materials\hmk_Materials.mtl
73+
TextBoxTemplateAssembly=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\ansi inch assembly.asm
74+
TextBoxTemplatePart=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\ansi inch part.par
75+
TextBoxTemplateSheetmetal=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\ansi inch sheet metal.psm
76+
TextBoxTemplateDraft=C:\Program Files\Siemens\Solid Edge 2021\Template\ANSI Inch\Hallmark_B.dft
77+
Assembly.Open/Save=Unchecked
78+
Assembly.Activate and update all=Unchecked
79+
Assembly.Property find replace=Unchecked
80+
Assembly.Remove face style overrides=Unchecked
81+
Assembly.Update face and view styles from template=Unchecked
82+
Assembly.Hide constructions=Unchecked
83+
Assembly.Fit pictorial view=Unchecked
84+
Assembly.Part number does not match file name=Unchecked
85+
Assembly.Missing drawing=Unchecked
86+
Assembly.Broken links=Unchecked
87+
Assembly.Links outside input directory=Unchecked
88+
Assembly.Failed relationships=Unchecked
89+
Assembly.Underconstrained relationships=Unchecked
90+
Assembly.Run external program=Checked
91+
Assembly.Interactive edit=Unchecked
92+
Assembly.Save as=Unchecked
93+
Part.Open/Save=Unchecked
94+
Part.Property find replace=Unchecked
95+
Part.Update face and view styles from template=Unchecked
96+
Part.Update material from material table=Unchecked
97+
Part.Hide constructions=Unchecked
98+
Part.Fit pictorial view=Unchecked
99+
Part.Update insert part copies=Unchecked
100+
Part.Broken links=Unchecked
101+
Part.Part number does not match file name=Unchecked
102+
Part.Missing drawing=Unchecked
103+
Part.Failed or warned features=Unchecked
104+
Part.Suppressed or rolled back features=Unchecked
105+
Part.Underconstrained profiles=Unchecked
106+
Part.Insert part copies out of date=Unchecked
107+
Part.Material not in material table=Unchecked
108+
Part.Run external program=Checked
109+
Part.Interactive edit=Unchecked
110+
Part.Save As=Unchecked
111+
Sheetmetal.Open/Save=Unchecked
112+
Sheetmetal.Property find replace=Unchecked
113+
Sheetmetal.Update face and view styles from template=Unchecked
114+
Sheetmetal.Update material from material table=Unchecked
115+
Sheetmetal.Hide constructions=Unchecked
116+
Sheetmetal.Fit pictorial view=Unchecked
117+
Sheetmetal.Update insert part copies=Unchecked
118+
Sheetmetal.Update design for cost=Unchecked
119+
Sheetmetal.Broken links=Unchecked
120+
Sheetmetal.Part number does not match file name=Unchecked
121+
Sheetmetal.Missing drawing=Unchecked
122+
Sheetmetal.Failed or warned features=Unchecked
123+
Sheetmetal.Suppressed or rolled back features=Unchecked
124+
Sheetmetal.Underconstrained profiles=Unchecked
125+
Sheetmetal.Insert part copies out of date=Unchecked
126+
Sheetmetal.Flat pattern missing or out of date=Unchecked
127+
Sheetmetal.Material not in material table=Unchecked
128+
Sheetmetal.Run external program=Checked
129+
Sheetmetal.Interactive edit=Unchecked
130+
Sheetmetal.Generate Laser DXF and PDF=Unchecked
131+
Sheetmetal.Save As=Unchecked
132+
Sheetmetal.Save As Flat DXF=Unchecked
133+
Draft.Open/Save=Unchecked
134+
Draft.Update drawing views=Unchecked
135+
Draft.Move drawing to new template=Unchecked
136+
Draft.Update drawing border from template=Unchecked
137+
Draft.Fit view=Unchecked
138+
Draft.File name does not match model file name=Unchecked
139+
Draft.Broken links=Unchecked
140+
Draft.Drawing views out of date=Unchecked
141+
Draft.Detached dimensions or annotations=Unchecked
142+
Draft.Run external program=Unchecked
143+
Draft.Interactive edit=Unchecked
144+
Draft.Print=Unchecked
145+
Draft.Save As=Unchecked

BreakExcelLinks/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## v 0.1.3
2+
Author @Derek G. Initial release.

0 commit comments

Comments
 (0)