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

The PTC Community email address has changed to community-mailer@ptc.com. Learn more.

Unable to Display File Size or File Count for Package Delivery?

Unable to Display File Size or File Count for Package Delivery?

When looking at the Deliveries table, there is no way to add information about the package contents or the delivery attachment. In my case, I would really like to list the number of items in the delivery and the file size for the ZIP attachment. This would make it easier for me to confirm the contents of the Delivery without visiting the details of the Delivery attachment individually. 

packageTable.png

I am always fearful about the contents of a Delivery's ZIP because Windchill is quite good at declaring victory by sending me an email only for me to find the Delivery ZIP only contains a portion of the items listed in the package. This is definitely true as the size of the package increases. 

2 Comments
d_graham
17-Peridot

Scott,

 

I saw your idea and thought it interesting.

Is this what your looking for?

It can be run either automatically when the zip file is created or with an action in the Delivery's action menu.

In short, I created two attributes (no big deal there) and then wrote java code to do two things.

1. Get the total number of primary and secondary content from the objects in the package and sum their file sizes.

2. Get the zip file created for the Delivery. Look in the zip to see how many files are there that came from the objects in the package and sum their file sizes.

 

The values displayed in the table are from the step 2, the files from the zip file.

 

The way this works is the creation of the zip is automatically detected. When that occurs the code runs and gets the number of files from the zip file and also sums their file sizes. These two values are then used to automatically populate the attributes FILE_SIZE and NUMBER_OF_FILES.

 

I am not displaying the values from step 1.  I only retrieved them to compare to the values in step two.  The do values match up.

d_graham_0-1618243918635.png

 

David

 

olivierlp
Community Manager
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.