Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Equivalent FILE/ NEW


ksoufi
 Share

Recommended Posts

Hi Bullines

In fact I'm searching to use an equivalent to FILE/NEW because I h've a problem described below:

 

_____________________________

dbinit();

Call_to_Function_1(); // open a file, generate some operations, post to a NC file 1,save file1.MC8 file

toolpath_init (TRUE, TRUE, &succf) OR dbinit();

Call_to_Function_2();// open a file, generate some operations, post to a NC file 2,save file2.MC8 file

__________________________________

 

The problem is that when I open the second MC8 file to check, i find all operations (generated by the 1st Call_to_Function_1() and those generated by the 2d Call_to_Function_2()).It seems that operations haven't been deleeted. I'm testing the OpMgr between the two calls and it's empty!

 

I don't know why the second MC8 file contains operations generated after initializing the OpMgr? frown.gif

Link to comment
Share on other sites

Are you testing toolpath_init() to be certain that it's returning TRUE? Perhaps:

 

code:

dbinit();

Call_to_Function_1();

toolpath_init (TRUE, TRUE, &succf);

 

if (succf)

{

dbinit();

Call_to_Function_2();

}

Sprinkle some calls to OpMgr() for testing purposes. If the test fails, maybe there's another function we should be using or you've stumbled upon a bug.

Link to comment
Share on other sites

Of course I'm writting :

____________________________

// Purpose: delete all operations and/or tools

toolpath_init (TRUE, TRUE, &succf);

if (!succf)

{

cleartextall();

mprintf ("imposible to delete operationsn");

wait_for_space();

return;

}

OpMgr();

____________________________

and everything runs fine, the OpMgr is really empty between the two calls but the second file contain all operations!!!!

 

[ 02-19-2003, 03:23 PM: Message edited by: ksoufi ]

Link to comment
Share on other sites

KSoufi,

One thing you can do is call the following:

 

execute_func("initscrn");

 

instead of calling dbinit(). There is additional work done inside File/New beyond what is done in dbinit()

 

NOTE: The execute_func() call gives you access to a multitude of Mastercam functions. See the MILL (or LATHE or WIRE, etc) .TXT file starting at line 9000 to see the character strings that map to certain function calls.

 

PDG

Link to comment
Share on other sites

Impossible!!!!!!!!!!!!!!!!!!!!!!!!

also using

execute_func("initscrn");

 

I obtain the same thing :

__________________________________________________

Call_to_Function_1(); // open a DWG file, generate some operations,save file_1.MC8, post to a NC file_1

 

OpMgr(); // contain 8 operations

execute_func("initscrn");

OpMgr(); // contain 0 operations : blank

 

Call_to_Function_2();// open a file, generate 7 operations, post to a NC file_2,save file_2.MC8,

 

OpMgr(); // contain total operations : 15 confused.gif

 

 

Every treatment (file 1 & 2) was tested, there's no problem.

 

But why even using execute_func("initscrn"); operations still in memory and at the same time the OpMgr is blank between the two treatments

What's that I'm confused.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...