Executing macro commands in API

Executing macro commands in API

luc_ponsaerts
Advocate Advocate
548 Views
0 Replies
Message 1 of 1

Executing macro commands in API

luc_ponsaerts
Advocate
Advocate

I have this macro that writes the data of an info window into a file , I call the macro in Powershape : 

INFO SHOW
UPDATE_INFO OPTIONS DETAILEDINFO ON SHOW
INFO_POPUP SAVE Filename FileDialog Write Validate C:/temp/selectedfaces.txt
UPDATE_INFO DISMISS

Works perfectly, the file with the data is created.

 

Now, I implement these commands in my c# app :

pShape.Execute("INFO SHOW");
pShape.Execute("UPDATE_INFO OPTIONS DETAILEDINFO ON SHOW");
pShape.Execute("INFO_POPUP SAVE Filename FileDialog Write Validate C:/temp/selectedfaces.txt");
pShape.Execute("UPDATE_INFO DISMISS");

No file is created. 

 

When I call the macro in the c# app :

string macroPath = dirName + macroName;
macroPath = macroPath.Replace("\\", "/");
pShape.Execute("MACRO RUN " + macroPath);

Perfect. The file with the data is created.

 

Some ideas ?

 

 

0 Likes
549 Views
0 Replies
Replies (0)