What Api function to know tie excel of a model .sldprt?

Hello,
What Api function can I use for know the path excel file (.xls)
vinculate to a model (.sldprt) without opening the Solidworks?
Regards
Reply to
swPeter
Loading thread data ...
Go to SW API downloads and get "Automate interaction with Microsoft Excel, configurations in SolidWorks documents, and creation of SolidWorks drawings (VB)". There is a pretty complete discussion of excel to SW linkages.
Reply to
TOP
Thanks to respond, but there not this the answer to my question.
I want to know if the model has a file tie .xls, before opening it with SolidWorks. And if it is certain, then, to know its Name and Path, to look for it.
To pardon the language to me. I write only a little English.
Reply to
swPeter
I am sure my Spanish is worse. :)
Would this be a tie to a design table or to an excel file in general?
We have somebody in the office that insists on making external design table files. It is a problem when checking in the files. At least in our case the excel file has the same name as the sldprt file.
Reply to
TOP
Yes, this a tie to a design table.
I am making an automatization in silence of thousands of archives, and must take the first file "excel"(design table), before opening the model in SolidWorks. In general Information of the file it is not that detail. If "SolidWorks" does not find "excel" it shows an error message that I must avoid.
I need that "SolidWorks" provides that information in a Api function, as does for example with "GetDocumentDependencies2" because "SoliWorks" has it.
Reply to
swPeter
There is no API call that will give you this information before the model document is opened in SolidWorks. One way to make this work would be to open the file that you are wanting to work with in Silent mode, then use DesignTable::FileName to get the location and name of the design table, then store this path, close SolidWorks model and .......
Reply to
SWX-VAR-JP
Have you made some code where this actually works? I'm having a little trouble with it myself.
Reply to
TOP
I forgot one thing, you have to have used an external design table before the call works. So you can use the export design table to save it out first.
Reply to
SWX-VAR-JP
I was trying to program the checks for an external design table and had some problems with getting DTType = DT.SourceType() to work properly. DT is a DesignTable object. DTType came up with all kinds of weird values like 28 and 95. Should be 1,2 or 3 if IIRC.
swPeter would need to first check that an external design table was used and then use the .FileName method to obtain that information.
Reply to
TOP
You have to make sure that you have the type library and constant library referenced, or you could declare these constants in your program.
Reply to
SWX-VAR-JP

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.