VB to retrieve "Revision" info from drawing documents
VB to retrieve "Revision" info from drawing documents
(OP)
I need to use VB to retrieve "Revision" info from drawing documents. Is there a way to retrieve this information quickly without actually loading the drawing document into memory? Do I have to use CustomInfo2, or is there a quicker way to read this information. Micrososft Explorer's tooltip shows this revision info. But I do not think it loads SW application object to read it.
Alex
Alex






RE: VB to retrieve "Revision" info from drawing documents
http://www.EsoxRepublic.com-SolidWorks API VB programming help
RE: VB to retrieve "Revision" info from drawing documents
Thanks for your quick reply. I have never used this "DSOfile.dll". I assumed that it is from Microsoft. How do I use it? Could you post demo codes to show how to use it to retrieve "Revision" property from a drawing document on server?
Thanks,
Alex Chen
VB6.0
SW2005 SP02
RE: VB to retrieve "Revision" info from drawing documents
1. Download this ActiveX file from Micorsoft.com;
2. Install it to Windows;
3. Declare it in VB project;
4. Use the following codes to retrive custom property info from SW documents.
**********************************************************
m_oDocumentProps.Open sFile, fOpenReadOnly,
dsoOptionOpenReadOnlyIfNoWriteAccess
Revision =
m_oDocumentProps.CustomProperties.Item("Revision").Value
**********************************************************
Just want to post the codes to share with fellow SW users.
Alex
RE: VB to retrieve "Revision" info from drawing documents
Now you've also learned how to incorporate additional references into a VB project. This greatly expands your VA/macro horizons. This is also the means by which you can plug into MS Excel or Word or other applications from a SW macro. Also, there are hundreds of other modules and controls available to add to your projects.
Good luck with your program. Let us know how it works when you're done.
RE: VB to retrieve "Revision" info from drawing documents
RE: VB to retrieve "Revision" info from drawing documents
Yes, you can write/update all custom properties (except those of configuration specific properties). But you need to change arguments in the open statement. A demo file for DSOfile.dll on Microsoft website contains detailed information on how to use it.
TheTick:
I developed a custom PDM software (using VB DAO) to manage documents in my company. It is universal for all digital files. This includes SolidWorks, AutoCAD, Word, Spreadsheet, images, audio, videos, or whatever documents. I evaluated many PDM software programs, and I like my custom PDM program better as it has a lot of automation features. DSOfile.dll is a very impressive ActiveX. I use it in my PDM to show revision of a document without loading it to computer memory. It is very nice, and very efficient.
Thank you again for pointing me to the right direction.
Alex
RE: VB to retrieve "Revision" info from drawing documents
RE: VB to retrieve "Revision" info from drawing documents