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:

file save some via chook


Recommended Posts

Does anybody know how to do a file-save-some via a chook?

 

I don't want to mess around with writing an ent or raw ent since surfs or solids may have other associated ents. Which maybe blanked or on different levels, or both.

 

What I looking for is

1) I set the select (.sel) for a series of ents.

2) then call a function with a filename that saves the selected ents (and any assoc or needed ents) to that file name.

 

Bryan smile.gif

Link to comment
Share on other sites

Bryan,

 

Once you've set the .SEL bits on the entities you want to save, call...

 

DllImpExp void set_save_with_mask(MC_BOOL set_flag);

 

...passing it 'TRUE'. Then call save_db() or CFile_DoFileSave() and then call set_save_with_mask() again, passing it FALSE.

If you forget to set it back to FALSE, all your Saves will be messed up.

Note that until X2 MR2 is released, this will only work for saving to MCX files.

Link to comment
Share on other sites

Thanks MasterShake. Unfortunately, saving to a temp database isn't really an option. I'm dealing with files in the 500MB or greater range, with hundreds maybe thousands of levels. Just loading it once is a major pain.

 

Pete,

Thank for the info I'll try it here soon. Actually, saving to just MCX is fine. The user can just run the appropriate converter on the directory themselves.

 

 

My next step was going to try write_ent_to_disk. But since most entities rely on other info or entities in mastercam, I didn't know if it did all appropriate background work. ie An arc needs additional view info. A trimmed surf relies on a base surf. A solid is just referance number to a parasolid which the sdk doesn't have access too.

 

Thanks everyone for your help.

 

Bryan smile.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...