cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

How to view CAD Data in Browser from Windchill using REST/Odata API

Siddharth_Jhs
14-Alexandrite

How to view CAD Data in Browser from Windchill using REST/Odata API

Hello Community,

I have recently installed Windchill 11.1 on my development environment and need to expose CAD Data to ThingWorx Navigate. I am referring PTC documentation https://support.ptc.com/help/windchill_rest_services/r2.0/en/index.html#page/windchill_rest_services/visualizationdomain.html# for reference. In which I am using following Odata endpoints in windchill to achieve this : 

1) Get /Windchill/servlet/odata/Visualization/Representations('OR:wt.viewmarkup.DerivedImage:786687')/PTC.Visualization.GetPVZ(IncludeAnnotations=true,Fidelity='Low Fidelity')

 

Here, returned data is downloadable and I am not able to view it on browser. Also, I have enable WebGL on my browser to render such files.  Kindly, let me know what could be an alternative to directly view CAD data on browser. 

 

 

Best Regards,

Sid

 

15 REPLIES 15

GetPVZ gives you a zip file which is viewable in CreoView, according to the documentation in Windchill/netmarkets/html/wrs/doc.html . I have not tried this myself.  

Siddharth_Jhs
14-Alexandrite
(To:rleir)

Thanks for your reply. I also saw that in documentation but all I am looking for is any alternative to this. Any other endpoint should I call using which I can get the output on browser.

 

Thanks,

Sid

ThingWorx Navigate has complex (or should I say undocumented) access to Windchill data. From memory it has access to thumbnails and possibly 2d representations. From memory, ThingWorx Navigate works with a standard browser. You may want to pose this question on a Thingworx forum. 

ThorstenMueller
13-Aquamarine
(To:rleir)

ThingWorx Navigate is using the ThingView Widget to display CAD-(Creo View) data in the browser. (as seen in this picture)

ThorstenMueller_0-1697698756448.png

You cannot directly view the CAD data in a browser without some Widget/app to render the data.
In ThingWorx Navigate you should bind a service like "Part_GetDynamicStructureRepresentation" to the "ProductToView" property of the ThingView widget.
There's also a help section about the ThingView widget in the Navigate help center:
https://support.ptc.com/help/thingworx/navigate/r9.4/en/ThingWorx_Navigate/Customization/webGL_extension/cv_webGL_extension_book/configuring_your_thingworx_server_to_work_with_the_thingview_widget.html#

 

Hi @Siddharth_Jhs 

ThingWorx navigate is nice example

 

You can create own page, with own functions, where you show the 3D model from CreoView file

You load just PVZ and the model will be shown on the page.

You just need to know how to create that page and how to use "CreoView WebGL API"

 

Petrh

I went through the documentation where it mentioned to configure MIME properties in web.xml and server.xml files.

Could you please tell will this will be sufficient or we need to install creoview client indicidually for each user while viewing CAD data?

I read about webGL API and enabled it in browser. Will it be sufficient? If so,  Any article for installing creoview client along with ThingWorx Navigate would be helpful for my understanding.

 

Regards,

Sid

Hi @Siddharth_Jhs 

CreoView WebGL API is an API that is used on the page.

You need to develop own page with this API library.

It is not just install sw and use it. You need to develop it.

 

ThingWorx Navigate is developed application that just use the WebGL Library. 

 

PetrH

Hi Perth,

Thanks for your reply. So if we are using ThingWorx Navigate we don't need install CreoView client explicitly. Is my understanding correct?

 

Regards,

Sid

Hello @Siddharth_Jhs 

 

\Yes, but it does not have all features as in Creo View, but for viewing 3D models, drawings and explode assemblies it is ok. 

 

PetrH

Hi @ThorstenMueller / @HelesicPetr 

Could any of you please provide me sample CAD assembly file in pvz format which I can use in my demo.  

I am planning to have following architecture flow:

Windchill eBOM (Part with CAD doc)-->OData REST APIs > PTC Visualization Domain and CAD Domain API  to download files in FileRepository ---->Invoking GetDirectoryStructure and GetFileListingsWithLink Services to get file downloadable link and binding it to ProductToView in ThingView Widget. 

All I need now is an Assembly file in PVZ format. 

 

Thanks,

Sid

Hi @Siddharth_Jhs 

I can't help with PVZ for this moment.

I don't have Creo installed, on my laptop because I've got new laptop and I haven't needed Creo for a while. 

PetrH

Hi Siddharth_Jhs,

you can download example pvz files from the following page:

https://www.ptc.com/en/products/creo/creo-view/extension-express-download

look at the "Sample Models" section.

 

That said, the out-of-the-box PartStructure App from ThingWorx Navigate is already doing exactly what you describe.
The OOTB app process is not downloading and storing the pvz file. Instead it is opened from Windchill directly.


In addition to the above, your Windchill system should already have the appropriate visualization data, if you have a CAD worker configured for your system or if you create visualization manually during checkin from your CAD tool. You should be able to see the pvz in the "Representations/Annotations" section of WTParts or EPMDocuments.

Hi @ThorstenMueller ,

As suggested by you, I am able to view manually uploaded pvz file under Representation/Annotation tab of windchill.

Could you or your team please provide me specific url endpoint which I should invoke from ThingWorx Integration connector so that I can get a downloadable link to store file in ThingWorx FileRepo. 

For better understanding I am attaching PPT of my use case here. Only point missing is the specific endpoint using which I can download Windchill CAD 3D Model in ThingWorx FileRepo. 

 

Thanks,

Sid

Hi Sid,

 

here's a tech support article that describes what services you can use to get the representation:
https://www.ptc.com/en/support/article/CS387764

You can directly bind this to ProductToView from the ThingView widget.
you don't have to use the ThingWorx file repository.

Regards,

 

Thorsten

Thanks @ThorstenMueller for sharing this article. 

 

Regards,

Sid

Announcements


Top Tags