■ Key update features
-You can add parameter names
-You can choose the parameter type
>> How to add parameter
1) open excel file
2) Add parameter name to cell > Save the excel file > Quit Excel programming > Open the saved excel file
3) Select the Parameter type > Save the excel file
* "WEIGHT" is the weight calculation area. Do not delete, do not change
>> VBA Code
Option Explicit
Private Sub Workbook_Open()
Dim region As Variant
Dim region_range As Range
'// Parameter Type Select
region = Array("String", "Real Number", "Integer", "Yes No")
'// Parameter region
Dim oColumnscount As Long: oColumnscount = Cells(15, Columns.Count).End(xlToLeft).Column
Set region_range = Range(Cells(14, 10), Cells(14, oColumnscount))
With region_range.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Formula1:=Join(region, ",")
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Error"
.InputMessage = ""
.ErrorMessage = "Please Provide a Valid Input"
.ShowInput = True
.ShowError = True
End With
End Sub
■ How the program works
1. Creo 어셈블 파일을 Open 합니다
2. Click the "NEW" button
3. Import the parameter value defined in the Excel file from the model (PART_NO ~ APPROVED)
4. If there is no parameter name in the model, it is automatically added
Attention >
- Be sure to open the assemble file. When I open and run the part file, an error occurs
- I used the excel scroll function.
The rest of the features are in development
'자동화 도구 ToolBOX > ToolBOX VBA' 카테고리의 다른 글
Creo Template 프로그램 #1 (0) | 2023.09.08 |
---|---|
ToolBOX VBA Part List 프로그램 업데이트 (0) | 2022.11.08 |
ToolBox VBA 1.1 - 백업 프로그램 업데이트 (0) | 2022.11.07 |
ToolBOX VBA 1.1 (2) | 2022.10.28 |
ToolBOX 베타 0.1.3 (0) | 2022.10.21 |