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:

Duplicate Tools??


Recommended Posts

Hey guys.... guess who!! smile.gif

 

I dont know if maybe it's the way I'm doing it. Or what.... but

 

when I search through the operations and pick out tools. It's for some reason, creating copies of the tools. So by the time I get through all the operations its it adds more of the same tools for somereason.

 

what's odd. is that it adds 15 instances of the same tool, and I only have 4 operatoins.

? just sounds odd, I could understand maybe double the operations ya know. or something. Really actually dont understand why it adds the tools in the first place.

 

I dont know I really dont get it.

 

I'm not creating a new tool. maybe when I use

 

 

Dim opref As COperationRef

Dim toolref As CToolRef

 

toolref = opref.operationTool

 

maybe its creating a tool to be able to read the opref tool??

 

I dont know.

 

is it the way I'm doing it.

 

And also.

 

If I have two machine groups.

and I reference the stock dimensions

 

I get the xyz of the last machine group.

 

So I was wondering how do I distinguish between operation groups?

 

headscratch.gif

Link to comment
Share on other sites

Ok... I've went rhrough piece by piece of the code.

 

and for even one operation with just one tool.

 

It adds a tool instance with this

-----------------------------------------------

 

Mastercam.MCFile.GetOperations(fname, oplist)

 

-----------------------------------------------

 

Maybe I should clean release it or something?

Link to comment
Share on other sites

Been playing with this some more...

 

If I have two machine groups.

and I use the GetOperations thing

 

then it puts all the duplicated tool instances in the second group. Even puts the tools from machine group in with the tools of machine group 2. Just seems odd...

 

Dont really know what else I could do....

 

Is there another way to get the operstions?

 

There's one more thing I could try

maybe instead of this

 

Dim oplist As ArrayList = New ArrayList

 

take out the New ArrayList part?

 

..................................... nope

 

that and I even tried doing a

 

oplist = nothing

 

and

 

gc.collect()

 

so now I'm clueless

Link to comment
Share on other sites

Cus really when I fire off a nethook that may have

 

getoperations function

 

in it. I shouldn't... as a mcam user. actually see the operations jump like they do.

 

ya know. if you have a lot of operations. then when it jumps like that. doing whatever its doing. It takes a long time just for up to 10 operations.

 

should be undisturbed ya know.

 

can't leave no trace smile.gif

 

cus If I start messing with geometry. and I mess something up because of one of these functions. I'd hate to be the one to blame for destroying weeks of work.

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