And by the way increase view on your YouTube video
Maybe nobody is doing it because nobody understands the value. What is the point of this macro? To draw a square is trivial. What do you want to do with the macro? I doubt anybody except you will ever care about this macro. It's not challenging in any way. It does not show special capability. It is not interesting. It can't do a useful task for anyone. It's hard to get people to do things for you for free when they are none of those things.
I need to write in a few values and then code the VBA to draw 2D and 3D drawings.
I did it in AutoCad with "UserForm" as in the video, but I can not get the "UserForm" in SolidWorks 2009 to appear.
How do I get the "UserForm" to appear in SolidWorks so I can do the same in SolidWorks as in the video?
To get the "UserForm" to appear is probably something to install with the installation of SolidWorks.
This is not a trivial question.
It is indeed utterly trivial. There are multiple examples available online to show how to use UserForms in SolidWorks VBA macros.
Attached is your macro.
To run the macro, first you must have a part, assembly, or drawing file open.
Then, point to Tools→Macro→Run. Browse to where you have saved the attached .swp file. Select it, and hit "Open".
Macro1.swp.zip 7.4 KB
it's totally basic to show userform in SW- I think you need to learn some visual basic before start writing SW macro
Here is the code
Dim swApp As Object
Set swApp = Application.SldWorks