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:

Recommended Posts

Hello all,

 

I am currently running X-5, and trying to sort some chains for a toolpath.

 

Using VBS, I have sorted 170 closed chains to different levels using the geometry's "Z" dims.

 

Each closed chain is on a different sequential level with sequentially higher z depths. These

levels have names "1" through "170".

 

Can I chain these levels in lable order, or can I append chains by turning on or selecting levels?

 

how do I cause starting points on each chain to start at a prefered location?

 

Any information is most appreciated.

 

Steven

Link to comment
Share on other sites

Hello again,

 

I would like to ask a couple of questions that might get me moving....

 

Can I use VBS to append another chain to an existing toolpath?

 

If I have several toolpaths using the same tool and parameters, can I somehow collect all

the chains and make one toolpath?

 

Is there any way to manipulate the chain manager from VBS, and if so, where do I get some information?

 

I very much appreciate any help anyone can give.

 

Regards,

Steven

Link to comment
Share on other sites

rocheey1,

 

In the VBS Mastercam help file, I find the following:

 

Bool ChainAll(

 

Bool, (Input : only generate closed chains?)

 

Bool , (Input: only find chains at Z=0?)

 

Integer, (Input: only find chains on this level? Use mcCHAIN_ALL_NUMBERED_LEVELS for all levels)

 

String (Input: only find chains on this level? Use mcCHAIN_ALL_NAMED_LEVELS for all levels)

 

)

 

 

Can you please explain a little on how Mastercam looks at the level names?

Does Mastercam start at level one and work upward? If so, then would not levels be chained by assending level numbers?

Does Mastercam sort all the level names and then chain in numerical order?

Are only integer numbers allowed for names?

 

Your feedback is very much appreciated as this information is not available in the help files.

 

Regards,

Steven

Link to comment
Share on other sites

VB Script ChainAll

 

I took a look at the (X6) source code and this is what these “all” flags mean ->

mcCHAIN_ALL_NUMBERED_LEVELS = -1

mcCHAIN_ALL_NAMED_LEVELS = ""

 

If we look at the declaration of ChainAll that you posted….

You can limit what gets chained using the parameters you pass in.

If you pass a Level Number, (a single Integer value).

It will chain everything* on that (single) level.

*You can also restrict what on this level gets chained, using “only closed” and/or “only Z=0”.

 

If you pass in mcCHAIN_ALL_NUMBERED_LEVELS for Level Number and pass in a non-blank Level Name ->

It will find the first level with that (text) “name” and then restrict what gets chained to that (single) level.

If both Level Number and Level Name are not set...

(Which really means that they are set using mcCHAIN_ALL_NUMBERED_LEVELS and mcCHAIN_ALL_NAMED_LEVELS) ->

It will chain everything, ignoring any restriction based on Level.

*Of course you could restrict what gets chained (from "everything") using the other two parameters as filters.

 

Note:

If you pass in both a Level Number ( > 0) and a non-blank Level Name, ChainAll will use the Level Number, ignoring the Level Name.

 

Does Mastercam start at level one and work upward? If so, then would not levels be chained by assending level numbers?

Does Mastercam sort all the level names and then chain in numerical order?

I do not see that there is “sorting” going on of Level Numbers when mcCHAIN_ALL_NUMBERED_LEVELS is used, and there is certainly no sorting of Level Names.

 

Are only integer numbers allowed for names?

No, a Level Name is “text” and can be any “text” (only limited to the max length allowed).

If could set a Level Name to => “123” if you wanted.

Link to comment
Share on other sites

Thank you for your in depth reply. It does indeed answer some of my questions.

 

I did "miss-speak" when I asked about integer numbers allowed for names.

 

I was understanding that the lable for numbered levels would be an integer number, ie "1".

Given this, then level 501 may have a lable of "1", 502 could have a lable of "2", and so on.

 

Please clarify if this is not the case. If I choose all numbered levels, then is this the same as

telling it to chain ALL levels, regardless of being named or not?

 

again,

thank you for your assistance. As you can see, this type of detailed information is very difficult to find,

 

Best regards,

Steven

Link to comment
Share on other sites
I was understanding that the lable for numbered levels would be an integer number, ie "1".

Given this, then level 501 may have a lable of "1", 502 could have a lable of "2", and so on.

A level does not have any "Name" unless you give it one.

Number and "Name" are to different and independent things.

 

Please clarify if this is not the case. If I choose all numbered levels, then is this the same as

telling it to chain ALL levels, regardless of being named or not?

Every Level has a Number, but is does not necessarily have a "Name".

The answer to this is YES. It will scan every level in the file, whether the level has a "Name", or not.

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