Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12488

Re: Excel Hyperlink to open part in Creo-view Express

$
0
0

Hi Manthan,

 

the hyperlink will not work. Please accept this fact. On the other side you can use macro as workaround.

 

I slightly modified my macro. It is now able to extract model path from hyperlink saved in the cell.

 

I uploaded bbb.xls file, it works well in Excel 2010. I select A1 cell and press CTRL+q to run macro. The code included in macro opens model in Creo View Express.

 

Sub Makro1()
'
' Makro1 Makro activate by clicking CTRL+q
'

'
' extract the model path from hyperlink in selected cell
'
Dim ModelPathFromHyperlink As String
Dim Position As Integer

ModelPathFromHyperlink = ActiveCell.Formula
Position = InStr(ModelPathFromHyperlink, """")
ModelPathFromHyperlink = Mid(ModelPathFromHyperlink, Position + 1)
Position = InStr(ModelPathFromHyperlink, """")
ModelPathFromHyperlink = Mid(ModelPathFromHyperlink, 1, Position - 1)

'
' open the model in Creo View Express
'
Dim Program As String
Dim TaskID As Long
Program = "C:\Program Files\PTC\Creo 2.0\View Express\bin\pvexpress.exe" + " " + ModelPathFromHyperlink
TaskID = Shell(Program, vbNormalFocus)

End Sub

 

If path to pvexpress.exe on your PC differs from the red one, then you have to modify the macro.

 

If you can test your model in bbb.xls,  you have to modify the contents of A1 cell.

 

Good luck

 

Martin Hanak


Viewing all articles
Browse latest Browse all 12488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>