CAD viewer integration displays blank preview when accessing external files

We’ve integrated Windchill CAD viewer with an external file storage system for large CAD files. The viewer works fine for files stored directly in Windchill, but when accessing files from the external storage location, the preview displays as blank. No error messages appear - just an empty viewer frame.

The CAD files are accessible via HTTP from the external storage, and we’ve configured the viewer to reference the external URLs. File streaming seems to work for downloads, but the viewer embedding fails to render the preview. I suspect this might be related to CORS configuration or how the viewer handles external file sources.

Has anyone successfully configured the CAD viewer to display previews from external storage locations? What CORS settings or viewer configuration changes are needed to support external file streaming?

Here’s the complete solution for CAD viewer integration with external storage:

1. CORS Configuration on External Storage: For S3-compatible storage, add this CORS policy to your bucket:

<CORSConfiguration>
  <CORSRule>
    <AllowedOrigin>https://your-windchill-server.com</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <AllowedHeader>Range</AllowedHeader>
    <AllowedHeader>Content-Type</AllowedHeader>
    <AllowedHeader>Authorization</AllowedHeader>
    <ExposeHeader>Content-Length</ExposeHeader>
    <ExposeHeader>Accept-Ranges</ExposeHeader>
    <ExposeHeader>Content-Range</ExposeHeader>
    <MaxAgeSeconds>3600</MaxAgeSeconds>
  </CORSRule>
</CORSConfiguration>

Key points:

  • Use exact Windchill server URL, not wildcard (security best practice)
  • GET and HEAD methods are required for viewer operations
  • Range header enables byte-range requests for streaming
  • Expose Content-Length and Accept-Ranges so viewer can validate streaming support
  • MaxAgeSeconds caches CORS preflight responses to improve performance

2. File Streaming Support: Ensure your external storage supports HTTP range requests. Test with curl:

curl -I -H "Range: bytes=0-1023" https://external-storage.com/file.prt

Response should include:


HTTP/1.1 206 Partial Content
Content-Range: bytes 0-1023/total_size
Accept-Ranges: bytes

If you get 200 instead of 206, the server doesn’t support range requests and the viewer won’t work efficiently with large files.

3. Viewer Embedding Configuration: In Windchill viewer configuration (codebase/com/ptc/windchill/uwgm/viewer/viewer.properties):

viewer.external.content.enabled=true
viewer.streaming.mode=true
viewer.external.content.protocol=https
viewer.cors.validation=strict

This tells the viewer to:

  • Enable external content source handling
  • Use streaming mode for large files
  • Require HTTPS for external URLs (security)
  • Validate CORS headers before attempting to load

4. Content Security Policy: If your Windchill server has CSP headers configured, update them to allow the external storage domain:


Content-Security-Policy:
  default-src 'self';
  img-src 'self' https://external-storage.com;
  connect-src 'self' https://external-storage.com;

5. Authentication Handling: If your external storage requires authentication, configure the viewer to pass credentials:

  • For pre-signed URLs: Include authentication token in URL parameters
  • For header-based auth: Configure viewer to include Authorization header in requests
  • Test that the authentication doesn’t conflict with CORS (credentials mode must match CORS policy)

Testing Checklist:

  1. Verify CORS policy is active on external storage (check with browser dev tools)
  2. Confirm range request support with curl test
  3. Test viewer with small CAD file first (under 10MB)
  4. Verify HTTPS is used for both Windchill and external storage
  5. Check browser console for any remaining CORS or CSP errors
  6. Test with large file (over 100MB) to validate streaming works

Common Issues:

  • Mixed content: Windchill HTTPS but storage HTTP (browser blocks)
  • Missing Accept-Ranges header: Viewer can’t detect streaming support
  • CORS policy not applied: Check bucket-level vs object-level policies
  • Authentication conflicts: Pre-signed URLs may need CORS policy adjustment

By properly configuring all three focus areas (CORS headers on external storage, file streaming with range request support, and viewer embedding configuration), the CAD viewer will successfully display previews from external storage locations. The key is ensuring both the storage server and Windchill viewer are configured to work together with proper security and streaming capabilities.


This draft is based on general Windchill knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.

This is definitely a CORS issue. The CAD viewer runs client-side JavaScript that tries to fetch the CAD file from your external storage. If the external server doesn’t have proper CORS headers configured, the browser blocks the request and you get a blank viewer. Check your browser’s developer console - you’ll likely see CORS-related errors there even if they’re not visible in the UI.

You need to configure CORS headers on your external storage server to allow requests from your Windchill domain. The minimum headers required are Access-Control-Allow-Origin, Access-Control-Allow-Methods, and Access-Control-Allow-Headers. Set the origin to your Windchill server URL or use a wildcard if security allows. Also verify that the file streaming endpoint supports range requests - the viewer needs byte-range support to load large CAD files efficiently.

Tested this on AWS S3 with Windchill 12.0 — adding the Range and Authorization headers to the CORS policy immediately resolved the blank CAD preview issue.

I checked the browser console and you’re right - there are CORS errors. The external storage is an S3-compatible object store. I have access to configure the CORS policy. Should I allow all origins, or is there a specific origin pattern I should use for Windchill? Also, what methods and headers does the viewer require?

For S3-compatible storage, you need to add a CORS configuration to your bucket. Don’t use wildcard origins in production - specify your exact Windchill server URL. The viewer needs GET and HEAD methods, and should allow headers like Range, Content-Type, and Authorization if your files require authentication. Also make sure the CORS policy exposes the Content-Length and Accept-Ranges headers in the response, as the viewer checks these to determine if streaming is supported.

Beyond CORS, check your viewer embedding configuration in Windchill. The viewer needs to know that it’s loading external files and should use streaming mode rather than trying to load the entire file into memory. In the viewer configuration, there’s usually a setting for external content sources that enables proper streaming behavior. Also verify that your external storage URLs use HTTPS - some browsers block mixed content if Windchill is HTTPS but the external storage is HTTP.