Extracting custom properties from solidworks files
Extracting custom properties from solidworks files
(OP)
Hi,
I need to extract the custom properties for 2000-3000 soldiworks files ,preferably in a excel .Please let me know what is the best way to do this. If somebody has some program available for this ,would really appreaciate it.
Thanks,
pag
I need to extract the custom properties for 2000-3000 soldiworks files ,preferably in a excel .Please let me know what is the best way to do this. If somebody has some program available for this ,would really appreaciate it.
Thanks,
pag






RE: Extracting custom properties from solidworks files
Matt Lorono
Lorono's SolidWorks Resources & SolidWorks Legion
&
RE: Extracting custom properties from solidworks files
Matt Lorono
Lorono's SolidWorks Resources & SolidWorks Legion
&
RE: Extracting custom properties from solidworks files
Regards,
pag
RE: Extracting custom properties from solidworks files
Colin Fitzpatrick (aka Macduff)
Mechanical Designer
Solidworks 2010 SP 3.1
Dell 490 XP Pro SP 2
Xeon CPU 3.00 GHz 3.00 GB of RAM
nVida Quadro FX 3450 512 MB
3D Connexion-SpaceExplorer
RE: Extracting custom properties from solidworks files
RE: Extracting custom properties from solidworks files
Colin Fitzpatrick (aka Macduff)
Mechanical Designer
Solidworks 2010 SP 3.1
Dell 490 XP Pro SP 2
Xeon CPU 3.00 GHz 3.00 GB of RAM
nVida Quadro FX 3450 512 MB
3D Connexion-SpaceExplorer
RE: Extracting custom properties from solidworks files
There is a way to do this without opening the files, but it requires installing somet stuff, and it's a bit trickier. This macro opens the parts, but won't load them into memory.
Make sure you change the paths to what you need them to be. Also, this is currently for .SLDPRT files. If you want drawings or assemblies, you just have to change to .SLDPRT to .SLDDRW or .SLDASM.
Dim Part As SldWorks.ModelDoc2
Sub main()
Set swApp = Application.SldWorks
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("C:\File.csv", True)
FileName = Dir("C:\*.SLDPRT")
visibility = swApp.DocumentVisible(False, swDocPART)
a.writeline ("Part Number" & "," & "Description")
Do While FileName <> ""
Set Part = swApp.OpenDoc("C:\" & FileName, swDocPART)
Description = Part.GetCustomInfoValue("", "DESCRIPTION")
a.writeline (FileName & "," & Description)
swApp.CloseDoc FileName
FileName = Dir
Loop
visibility = swApp.DocumentVisible(True, swDocPART)
End Sub
RE: Extracting custom properties from solidworks files
-handleman, CSWP (The new, easy test)
RE: Extracting custom properties from solidworks files
It is possible to get the custom properties (as long as they're not configuration specific) using a vbsript file you create in notepad, but it requires installing some .dll file that's actually for reading Office documents. It was a long time ago, and our IT whiz-kid figured it out, but I do know for a fact I didn't need SolidWorks open to do it.
RE: Extracting custom properties from solidworks files
RE: Extracting custom properties from solidworks files
It is not too much of a hassle to get, but if you are only going to do this once, code like what gopack13 posted should suffice. It is not the fastest way to do it, but you could run it overnight or over the weekend.
Eric
RE: Extracting custom properties from solidworks files
Windows File Custom Properties list utility
Joe
SW Office 2008 SP5.0
P4 3.0Ghz 3GB
ATI FireGL X1