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:

Mastercam X SDK Questions


Recommended Posts

I am converting an SDK application from version 9 to version X and have the following questions:

 

1) Variables *vpviews, vpcurrent, nc_prefix and nc_filename no longer exist. How do I get this information? (Variable nc_suffix does still exist)

 

2) Routine geo_filename_valid() now always returns false, even when the filename is valid.

 

3) Is there a way of saving data with the mastercam part so that the next time the user loads the same part I can retrieve the data?

 

Any help greatly appreciated.

Link to comment
Share on other sites

quote:

3) Is there a way of saving data with the mastercam part so that the next time the user loads the same part I can retrieve the data?

What kind of data?

 

One trick I've used is to create a data file in the same directory with the same name but different extension. Then the chook only needs to replace the extension and look for the data file.

 

part file:

c:jobssomedirectorypart132.mc9

Data file:

c:jobssomedirectorypart132.dat

 

If you need to data to move with the file I've been known to hide it in the mc9 file at times.

 

Bryan smile.gif

Link to comment
Share on other sites

Bryan314: The data I want to save is just text such as filenames etc. Saving it in a file is my fallback solution. When you say "hide it in the MC9 file", how do you this?

 

Bullines: Do you know how to access this information now?

 

Thanks for the responses.

Link to comment
Share on other sites

For heavy database stuff I've just used a database or csv/text file with a same filename (as I mentioned above) as the mc9 file.

 

For simple stuff I just stick it in a note. This is usually data I don't need to read back out or manipulate too much. These are usually simple notes from the designers or such.

 

But...

 

I don't see why you couldn't stick it on a separate layer that isn't normally used. Then just loop through the entity database an look at any notes. Stick some kind of unique identifier at the beginning of the text ("file list:" or "fl3rev2" or whatever ) so that it can be distinguished from the user created notes. And if you really want to hide it, blank it out. But if it is blanked it can't be saved out with File->save some.

 

 

And here's a real secret I haven't told many people. If you have data that needs to be associated to a level, and be saveable with 'save some', and not on the actual level itself. Shove it into the 'level set' field of the level manager. The Level name and Level set together have a text limit about 280 to 300 character depending on the version of MC. But formated right 200 characters can represent ALOT of data. The nice thing is when a 'save some' is done the Level Name and Level Set (and your data) are saved with it.

 

Bryan smile.gif

Link to comment
Share on other sites

Thanks again for the responses. I found the view information previously in vpviews and vpcurrent variables is now in cur_gview_ent.

 

Bryan, I think saving data in notes would be a good way to go for me. As you can probably tell, I am a novice with the Mastercam SDK so any information you have on how to create and retrieve notes or any sample code would be greatly appreciated.

 

Thanks again.

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