Creo View 3.1 M010: Windchill 11.0 M010 及之后版本如何不使用瀏覽器插件加載 Creo View 軟件?
2018-01-03 來自: 惠州市多瑞科技有限公司 瀏覽次數:2381
Creo View 新的加載機制:
Creo View 3.1 M010 及以后版本安裝時,會自動安裝 Creo View Agent (bin\pvagent.exe)
和傳統 Creo View 插件注冊 (pview.ocx) 的方式類似,類似 Internet Explorer 11 版本的瀏覽器仍然以這種方式注冊新的 Uniform Resource Identifier (URI),這些 URI 以 creoview:// 名稱開頭
Windchill 11.0 M010 及其后續版本現在調用這些 URI 讓瀏覽器加載 Creo View Agent,并反過來連接 Windchill,目的是讓 Creo View 客戶端完全和 Windchill 進行集成
Windchill>瀏覽器>Creo View 加載工作流:
用戶點擊 Windchill 對象詳細信息頁面上縮略圖或者內容選項卡中相應的表示法,執行在Creo View 中打開的動作
Windchill 可視化服務(WVS) 構建 creoview:// URI 字符串,包括以下:
a. Windchill 服務器基本 URL 信息
b. 客戶端上使用的瀏覽器類型
c. Windchill 需要加載的進程 ID
d. Windchill 需要加載的用戶賬戶信息
瀏覽器將需要注冊的 URI 信息映射到 Creo View Agent (pvagent.exe)中,在執行前,跳出對話框讓用戶確認是否需要執行:
Internet Explorer | Prompt: Do you want to allow this website to open a program on your computer?![]() |
---|---|
Google Chrome | Prompt: External Protocol Request Google Chrome needs to launch an external application to handle creoview: links... The following application will be launched if you accept this request:... ![]() |
Mozilla Firefox | Prompt: This link needs to be opened with an application.![]() |
假設你已接受 (點擊OK),并選擇記住我的決定 (可選項,可根據情況決定是否勾選),瀏覽器會執行系統請求,調用 Creo View Agent (pvagent.exe),并把編譯后的creoview:// 信息傳回,舉例為以下的命令行:
"<path>\bin\pvagent.exe" "creoview://?wcparams=eyJhdHRyaWJ1dGV...XJpZCI6IndjYWRtaW4ifSwiaWQiOiJjdiJ9"
Windows 用戶賬戶控制 (UAC) 也會跳出對話框讓你確認請求的應用程序可以被加載
如果 Creo View Agent 進程未完成 Windchill 服務器和用戶賬號的匹配,Creo View Agent 將做以下動作:
閃屏:阻止用戶多次重復點擊造成網絡潛在影響
顯示 Windchill 認證窗口或Windows 認證窗口,要求提供獨立的進程連接 Windchill
Creo View Agent 檢查輸入的 Windchill 用戶名正確并和 Windchill 用戶控制一致的話,則退出;否則會跳錯:
Error: ATTENTION: Must authenticate client using the same authenticated Windchill user.
iv. 匹配成功,Creo View Agent 加載 Creo View client (productview.exe) 進程打開請求的表示法
如果 Creo View Agent 進程未處理 Windchill 服務器和用戶認證, Creo View Agent 會加載一個會話選擇框:
用戶可選擇創建新會話或將當前表示法添加到結構中
當 Creo View Client 加載后,通過其頂層的 Creo View Agent 進程和瀏覽器進行通信
解碼 URI 連接字符串:
URI 字符串是通過 creoview:// URI 語法連接,基于 JSON (JavaScript Object Notation) string 的 base64 方式。
解碼 URI 連接字符串范例如下
creoview:///?wcparams=eyJhdHRyaWJ1dGVzIjp7InVybGJhc2UiOiJodHRwOi8vc2VydmVyLW5hbWUucHRjbmV0 LnB0Yy5jb20vV2luZGNoaWxsIiwiYnJvd3NlciI6ImllIiwic2Vzc2lvbmlkIjoiWWJWNW8yaW5wcmJ4Y0FoVno一MUg tNzEyd0U0LjFndmUiLCJ1c2VyaWQiOiJ3Y2FkbWluIn0sImlkIjoiY3YifQ==
內嵌的 JSON 字符串可以通過將 wcparams 字段的值拷貝到相應解碼工具的方式進行解碼,如 https://www.base64decode.org/
{"attributes":{"urlbase":"http://server-name/Windchill", "browser":"ie", "sessionid":"YbV5o2inprbxcAhVz51H-712wE4.1gve", "userid":"wcadmin"},"id":"cv"}