I am making a small tool with VBA, and need to view the sheetformat file(*.slddrt) and get its information, however, as my API level , it would open the .slddrt file 1 by 1 and then get the info, the performance is very bad.
I am wondering if we can use the VBA with document manager API to mak it ? Using document manger API , it can get the file information without running the SW , the performance is good.
questions:
1. can VBA use the document manager API ? need the key or not ?
2. yes in Q1, then can the ducument manager API view the file informatin of a sheet format file(.slddrt)
many thanks
regards
Vincent
SolidworksApi macros
Vincent Li,
1. Yes, you can, but you shouldn't because using a VBA macro requires SolidWorks to be open, and it is dangerous to have SolidWorks open while using the Document Manager API. If you go ever use DM with VBA, do not edit the file in any way.
2. I believe you can open a sheet format file using ISwDMApplication2::GetDocument2, but I don't see any methods for extracting sheet format specific data. Please see attached. Of course, you never told us what type of data you're trying to extract from the sheet format file, so I can only guess. In the future, please be more detailed when describing your problem.
Keith
SolidWorks API Video Tutorials
Thank you Keith,
the data I want to extract is the direction type (vertical or horizontal type) of the sheet format, and its size , such as length and width.
sorry for missing this point.
thanks for your kindly help
regards
Vincent
Hi Vincent,
Thanks for the additional info. That isn't available via the Document Manager API, unfortunately.
Keith
SolidWorks API Tutorials
sure, thank you so much.