Hello everyone When I write Dim swApp As SldWorks.SldWorks in macros, I encounter a user-defined type not defined. please Help me . Thanks
Hello everyone When I write Dim swApp As SldWorks.SldWorks in macros, I encounter a user-defined type not defined. please Help me . Thanks
Nafise Safi wrote:
hello
I'am doing this inside SOLIDWORKS and my version of SOLIDWORKS is 2016.
Then you should pick SW2016 libraries and not 2010.
Yes you are right. But sldworks 2016 is not my reference and it's 2010 only because I chose it!
I used Browse, but I did not find 2016 ...
Nafise Safi wrote:
Yes you are right. But sldworks 2016 is not my reference and it's 2010 only because I chose it!
I used Browse, but I did not find 2016 ...
Did you scrolled down the list to see if 2016 is listed OR trying searching in the installed folder for 2016 version. The DLL file name would be same as 2010 but version would be different.
Check under this location C:\Program Files\SolidWorks Corp\SOLIDWORKS\api\redist (the might be different in your machine depending on how you installed)
Do not look at api folder. Look at the root folder where sldworks.exe is.
In your case this would be
D:\SOLIDWORKS\sldworks.tlb
D:\SOLIDWORKS\swconst.tlb
D:\SOLIDWORKS\swcommands.tlb
Is this the drive (i.e. D drive) where you've SOLIDWORKS installed? If yes then pick the DLLs files as suggested by Artem
Also can you post a screen showing you macro current references?
See this for a solution: Missing SOLIDWORKS Type Library References