Download files from Windchill by Excel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Download files from Windchill by Excel
Dear Reader,
Our purchase department is spending hours downloading manuallya dxf file for each drawing beforesending it to the manufacturer.
We like to automate this manual downloadfrom Windchill and would like to work with Excel (and VBA).
The number of the drawing to look for could be entered in the Excel list and the vba code could download the dxf file attached to the drawing and place this in a folder.
Does anyone have experience with this and likes to share his code ?
Best regards,
Bernard Wielfaert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You could approach this as follows..
1) On the server side which is Windchill, write a REST ful web service,
which would take the number as input and return the dxf file attached as
content from the drawing over HTTP.
2) Your client side which could be anything from Flex / RIA based service
consumer to excel..Although I have no experience in developing excel as a
web service consumer but a quick search revealed that it should be quite
easy " by using a specialized web service add-in and by writing a small
amount of macro code. The first step is to download the Office Web Services
Toolkit, a free add-in that gives you the ability to call remote web
services from inside an Office document. To download the toolkit, surf to
the Microsoft Download Center and search for Office Web Services Toolkit.
You'll see two different versions: one that's designed for Office XP and
another that works with Office 2003. Once you install the toolkit, you're
ready to web-enable your worksheets." In other versions of excel the
approach might differ...
Regards
Shudh Datta
Shudh@shudh.me
——--------
Written on Droid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
OOTB package seems to be best approach for meeting your requirements. You
can keep track of the packages you shared with your manufacturer.
Please find the attached for another custom approach. All the drawing
numbers can be collected in a flat file and the flat file can be uploaded
into Windchill for downloading the drawings dxfs.
This approach is very handy if you want to navigate associations for
downloading the content.
Thank you and have a great time.
Best Regards
Swamy Senthil
Principal Solutions Architect, Swasen Inc
swamy.senthil@swasen.com(Email); 909 800 8423(M); 973 324 2729(W); 866
908 6561(F);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
We had a similar requirement but it was for documents. I wrote a query
in report manager and embedded that query into excel. This allows the
users to query Windchill and download the content without having to go
to the information page for each object.
I'm using VB to control the buttons (Run Report, Clear, Download All
Content). This should be easy to re-create for EPMDocument attachments.
Let me know if you're interested in this option and I'll send you some
more detail.
Thank you,
Dax Williams
Engineering E-Tools Administrator
GE Healthcare OEC
Surgery
-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
you using WTParts as well?
I wrote a VB application that takes the .zip/.jar file from the WTPart
Export command. From a Part's details page click the Actions menu and Click
Export. One of the options has the option do download the Cad data as well.
My little application extracted the zip/jar,
Copied the part files to their own folder and renamed them with version and
iteration
Move the documents to their own folder
Found all the representation.jar files that were primary content of drawing
objects and extracted the PDFs to their own folder.
We happen to publish our Pro/E drawings to PDF.
This was relatively easy to do and more could probably be done with it, but
I don't have the time or need to expand it. I'm hoping that improvements in
Packages in 10 will negate the need for this tool to survive our upgrade.
Steve D.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Shudh,
This seems to be a decent solution but requires heavy knowledge of the insides of Windchill which I do not have actually.
Can you shed some light on the REST full web service that needs to be written at the Windchill side ?
Best regards,
Bernard Wielfaert
Software Engineering
LVD Company NV Belgium
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Dax,
Yes, that sounds as a possible solution. Please send me more details.
Best regards,
Bernard Wielfaert
Software Engineering
LVD Company NV
Belgium
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Swamy,
Thanks for your reply.
I gave the "packages" a try but find that there is still much operations (clicking and searching) involved before one can send a package.
Working with Excel enables also the possibility that the numbers are imported from an ERP system, so we prefer to work with Excel.
Best regards,
Bernard Wielfaert
Software Engineering
LVD Company NV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Stephen,
The dxf file is a secondary contents attachment to the drawing, seeattached picture. We are using WTParts as well. The drawing and 3Dmodel are associated the the WTPart.
Best regards,
Bernard Wielfaert
Software Engineering
LVD Company NV
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Joe Kent
Engineering Systems Administrator
R&D/Leverage
Structural Brand Development / Mold Manufacturing
"With Us, Ideas Take Shape"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Steve D.
Sent from my iPad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please see the attached presentation and example files for creating a
Windchill Report Interface in Excel. It's fairly straight forward but
please feel free to contact me if you have any questions.
Thanks,
Dax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Attached is the export (.qml file) for the report used in the example.
This may be helpful for those of you who haven't created a report using
Report Manager. You can import this .qml file into your development
environment.
Hope this helps,
Dax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Do you know a way to automate logging into Windchill from Excel? I have created a report and added it to Excel and would like to avoid having to log into the Windchill server when I refresh the report.
If there is a way to log into the server with no manual interaction, that would be great. I need to automate some reports for sharing with others, and need to get it to the point where once the Excel file is opened, it refreshes the web query automatically.
-marc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Marc DeBower,
I haven't attempted to bypass the login in Excel but I've heard it can be done. I believe Jered Larsen figured out a way around the login. Maybe reach out to him and see if he still has this information?
Just to note, once you open excel and login, you shouldn't need to login again if you refresh of the query. At lease not with the ones we've created. If you do get the information, please post it back to the report page so we don't have to figure it out ourselves.
Good Luck,
Dax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi
You can try this vb code, it seem to bypass basic authentication used by Apache:
Public Sub testPDS()
DebugOn = True
Set FSO = New Scripting.FileSystemObject
Set XmlHttp = CreateObject("Microsoft.XMLHTTP")
USER_NAME = "xxxxxx"
USER_PASSWORD = "xxxxxx"
XmlHttp.Open "POST", "https://pds.ptc.com/Windchill/app/", False
XmlHttp.setRequestHeader "Content-Type", "text/xml"
XmlHttp.setRequestHeader "Authorization", "Basic " + Base64Encode(USER_NAME & ":" & USER_PASSWORD)
XmlHttp.send ""
If (DebugOn) Then
MsgBox XmlHttp.responseText
End If
End Sub
Let me know if this answers your question...
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for uploading the code, when I run it, I get this:
...and it doesn't seem to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is exactly what I am trying to do, but the link doesn't show up in Marc's last post. Can you edit your post with the link Marc or give a brief explanation of what worked for you?
Thanks,
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
