Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: How to get physical file size from an EPMDocument using Java code?

$
0
0

Checkout the wt.content package in Foundation.

I think you want something like this.

 

import wt.content.*

...

EPMDocument doc = ...

ContentItem contentItem = ContentHelper.getPrimary(doc);

float sizeInKb = 0;

if (contentItem instanceof ApplicationData) {   // as opposed to ExternalData or URLData

    sizeInKb = ((ApplicationData)contentItem).getFileSizeKB();

}

 

I haven't tried it and I'm not sure if these methods are supported and it might be more efficient to write some query but this seems reasonable.


Viewing all articles
Browse latest Browse all 8876

Trending Articles



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