What kind of macros are those?? Do they include some user forms??
First Thank You for reply.
Yes I am using forms, and I found out that instead of this :
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Dim swDraw As SldWorks.DrawingDoc
I need to do this:
Public SelMgr As Object
but I didn't try it yet.
Am I in the right direction?
Also I have a problem creating reference point using getVisibleEntities and the getStartingVertex or getEndingVertex because
getVisibleEntities gets also invisible edges. What I mean is that on the section view it will pick up also edges that are part of bigger view which are invisible in this section view. Is there any way to separate them on the drawing for time being while my macro works?
Or is there any other good solution to find top, most to the righ and bottom vertexes. I just want to be able to create 3 border reference points on the view.
There are several important points you need to know while downgrading the macros from 2013 to 2012:
1) You need to replace the SolidWorks API references (type libraries) from 2013 to 2012
2) 2012 VBA macros are 32 bit based while 2013 and newer are 64 bit based. That means if you have any 64 bit compatible references (usually this is the references to databases, 3rd party UI controls) this needs to be replaced with corresponding 32 bit versions. You may also check this by the path of your references (if it is installed into a Program Files folder it is x64 if Program Files (x86) - it is 32 bit version).
3) If you macro is using any win 32 API you need to replace all declarations and remove PtrSafe key word and replace LongPtr with Long in Win32 functions.
4) You need to make sure that the API methods you are using are available in previous version of SolidWorks. For example IConfigurationManager::AddSpeedPak2 added to SolidWorks 2013 so it is not available in 2012. You need to use IConfigurationManager::AddSpeedPak instead. The
IComponent2::MakeVirtual is added to 2013 as well but it has no analogues in 2012 so you may need to exclude this one.
Regards, Artem Taturevych | Snr. Developer | IC3D ANZ
IC3DSteel – New Steel Solution for SolidWorks
Thank you. It will be useful for me and other people reading this.