Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running macro @ startup with multiple modules

75 views
Skip to first unread message

Corey Scheich

unread,
Feb 19, 2004, 2:37:32 PM2/19/04
to
Dale Dunn graciously provided me with a tip to start a macro upon startup of
SW by adding this to the shortcut target
"C:\Program Files\SolidWorks\SLDWORKS.exe" /m "G:\users\cds\Working
Macros\Events.swp"

The problem I have run into is I added a few Modules and now it is running
the wrong function
Instead of Module1.Main I am getting Get_User_Name.GetUserName, Is there a
way to specify Module1.Main or to specify which function runs automatically,
say, in the code or preferences or something

TIA

Corey Scheich


rocheey

unread,
Feb 20, 2004, 9:25:26 AM2/20/04
to
>> Is there a way to specify Module1.Main

Im not sure if there is, but that would sure be handy


>>or to specify which function runs automatically,

Try moving your Sub Main to be the LAST sub/function in the module.

TheTick

unread,
Feb 20, 2004, 11:15:07 AM2/20/04
to
One possibility...

One quirk I found with SW macros is that the code for "Sub Main()"
has to be at the bottom of the module it is in.

"Corey Scheich" <csch...@plymouthind.com> wrote in message news:<c13322$1cinpb$1...@ID-200385.news.uni-berlin.de>...

Dale Dunn

unread,
Feb 20, 2004, 11:49:18 AM2/20/04
to
Didn't I read that's supposed to be fixed in '04?

Corey Scheich

unread,
Feb 20, 2004, 12:08:08 PM2/20/04
to
I am running 2003, and that worked but I had to move it to the module that
was being run and move it to the bottom. How does it decide which module to
look for Sub Main() in. I had it in Module1 and it was the only procedure
in there. I haven't tested 2004.

Corey

"Dale Dunn" <daledun...@jamestool.com> wrote in message
news:Xns949578D97ABAda...@65.24.7.150...

Gabe Osten

unread,
Feb 20, 2004, 12:05:54 PM2/20/04
to
A shade off topic... Does anyone know if there are any other "undocumented"
command line switches that could be usefull?


Stefan Berlitz

unread,
Feb 20, 2004, 2:32:37 PM2/20/04
to

"Corey Scheich" <csch...@plymouthind.com> schrieb im Newsbeitrag
news:c13322$1cinpb$1...@ID-200385.news.uni-berlin.de...

Please take a look at http://makeashorterlink.com/?Q4F622977

HTH,
Stefan

--

unofficial german SolidWorks helpsite
http://solidworks.cad.de
tools and programs for SolidWorks
http://swtools.cad.de


TheTick

unread,
Feb 21, 2004, 12:17:57 AM2/21/04
to
Macros do have their limitations in size and ability. If you want to
monitor events and start automatically with SW, there's nothing like
an addin: smaller, faster, and cleaner, plus the ability to add
toolbars and menus.

I am putting together a presentation on making an addin from a VB .exe
for our user group meeting (Milwaukee, WI, USA) March 4. This
involves taking a simple VB .exe and adding one class module (well
annotated with hints and explanations) plus a .res file for toolbar
bitmaps (this will also be demystified). The project will be posted
the following weekend to my website, http://www.EsoxRepublic.com

Getting a full version of VB6 is well worth it. There are many
advantages beyond just being able to compile. VB6 is fairly cheap,
now that it is obsoleted by VB.net.

p.s. I know I owe someone out there a posting of a registry scrub
utility. It's done, I just have to get it posted. It should be up
this weekend if the family stays healthy!


"Corey Scheich" <csch...@plymouthind.com> wrote in message news:<c13322$1cinpb$1...@ID-200385.news.uni-berlin.de>...

TheTick

unread,
Mar 3, 2004, 4:11:52 PM3/3/04
to
FYI--

My presentation has been preempted and rescheduled for the fall
Chicago-area combined user group meeting.


ro...@liquidschwarz.com (TheTick) wrote in message news:<2e958085.0402...@posting.google.com>...

0 new messages