본문 바로가기
  • 환영 합니다 ! Welcome!
VBA For Creo

Windchill : Common Space에 저장된 모델의 URL을 가져오는 방법

by ToolBOX01 2024. 6. 19.
반응형

Creo VBA API를 이용하면, Windchill과 함께 Template 모델로 새로운 모델을 만들고, 체크인 할수 있습니다.

다음 코드는 모델 이름으로 URL 주소를 알수 있는 코드 입니다

    Dim WCServer As IpfcServer
    Set WCServer = BaseSession.GetActiveServer
    
    Cells(8, "B") = WCServer.GetAliasedUrl("tmp_050male_0a.prt")

 

▷ ▷ 실행 결과

wtpub://plm/Products/Demo/tmp_050male_0a.prt

위와 WC 서버의 별칭으로 표시된 URL 주소를 얻을수 있습니다. 이것은 URL 주소로 변경 가능 합니다.

다음과 같은 코드를 사용 합니다

    Dim WCServer As IpfcServer
    Set WCServer = BaseSession.GetActiveServer
    
    Cells(8, "B") = WCServer.GetAliasedUrl("tmp_050male_0a.prt")
    Cells(8, "C") = BaseSession.GetUrlFromAliasedUrl(Cells(8, "B"))

 

▷ ▷  실행결과

http://plm.*****.com/Windchill/app/#servlet/WindchillAuthGW/wt.enterprise.URLProcessor/URLTemplateAction?action=ObjProps&oid=OR%3Awt.epm.EPMDocument%3A247311&u8=1

 

위 주소는 아래와 같이 모델의 상세 정보 주소 입니다.

 

Creo 모델 이름으로 WC 주소를 가져올수 있습니다 또한 별칭으로 된 URL 주소를 가져올수 있고, 이것은 Config.pro 파일에 응용할수 있습니다.