반응형
GetModel() vs ListModels()
두 메서드 모두 이미 세션에 로드된 모델을 찾는 기능입니다. GetModel()은 이름으로 하나를 콕 집어 찾고, ListModels()는 세션 전체 목록을 가져옵니다.

GetModel() — 이름으로 특정 모델 찾기 Sub GetModelExample()
Sub GetModelExample()
|
ListModels() — 세션 전체 모델 순회
| Dim oSession As pfcls.IpfcBaseSession Dim Models As IpfcModels Dim Model As IpfcModel Dim i As Integer Set oSession = conn.Session Set Models = oSession.ListModels() '// 전체 모델 목록 출력 For i = 0 To Models.Count - 1 Set Model = Models.Item(i) MsgBox i & ": " & Model.FileName & " / " & Model.Type Next i |
반응형
'업무 자동화 > VBA, VB.NET For Creo' 카테고리의 다른 글
| 초보자를 위해 . . . . Feature 정보 가져오기 #1 (0) | 2026.05.06 |
|---|---|
| 초보자를 위해 . . . . IpfcBaseSession 환경설정 기능 (0) | 2026.05.04 |
| 초보자를 위해 . . . . 파일 불러오기 (0) | 2026.05.04 |
| 초보자를 위해 . . . . 모델의 Parameter 값 가져오기 (0) | 2026.05.02 |
| 초보자를 위해 . . . Creo 파일을 Session(메모리)으로 가져오기 (0) | 2026.04.30 |