Site Logo
Site Logo
 
It is currently Sun Apr 02, 2017 10:21 pm

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Running macro file from VB
PostPosted: Thu Jan 14, 2016 11:47 am 
Offline
DELCAM User
DELCAM User

Joined: Tue Feb 17, 2015 7:15 pm
Posts: 29
Hello,

I have a problem with running some complex macro file from CSC because apparently the following command executes macros line by line and not the whole program at once.

PowerSHAPE . RunMacro

This causes program with IF or WHILE conditions to fail. What is the correct syntax to execute complete macro? There is RunComplete method under PSMacro class, but how can you define file path for the PSMacro object?


Top
 Profile  
 
 Post subject: Re: Running macro file from VB
PostPosted: Thu Jan 14, 2016 12:41 pm 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
Hi Erik, I have answered this in your other forum post. But for completeness will answer here also:
You should use the following code to achieve this:

Code:
var macro = powerSHAPE.LoadMacro(new Delcam.FileSystem.File("c:\files\mymacro.mac"));
macro.RunComplete();


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB