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:

Rename operations - lost geometry


Recommended Posts

Hi,

 

After I renamed the nci name of selected operations all 2d geometry like point, boundary's are lost, only the surfaces not.

Maybe I did something wrong in my code?

 

http://www.youtube.com/watch?v=wOI9xtVxBig

 

    Public Shared Function RenameOperations(ByVal nci_Name As String) As Boolean

       Dim opInfos1 As Mastercam.Database.Operation
       Dim flag_OP_Selected As Boolean
       Dim flag_OP_Dirty As Boolean
       Dim intCount As Integer = 1
       Dim nci_Verzeichniss As String = vbNullString

       Dim OpList() As Mastercam.Database.Operation = SearchManager.GetOperations()
       Dim op As Mastercam.Database.Operation

       For Each op In OpList

           opInfos1 = op


           flag_OP_Selected = opInfos1.Selected
           flag_OP_Dirty = opInfos1.Dirty

           If (flag_OP_Selected And Not flag_OP_Dirty) Then
               nci_Verzeichniss = System.IO.Path.GetDirectoryName(opInfos1.NCIName)
               opInfos1.NCIName = System.IO.Path.Combine(nci_Verzeichniss, nci_Name & "_" & intCount & ".nci")
               opInfos1.Commit()

               intCount += 1
           End If

       Next op

   End Function

Link to comment
Share on other sites

Ekke,

 

I've never such a thing.

 

If you send me your sample MCX-5 and code that you're running so that I can replicate this on my system.

Then I can look into it.

 

SDK <at> mastercam.com

 

Hi Martin,

 

did you received the code and the sample, I have sent you?

Link to comment
Share on other sites
  • 2 weeks later...

Hi Martin,

 

the rename function works perfekt, thanks for writing me a dll for it.

Also the extra work for saving the setting.xml to a better place, I appreciate it.

 

Silas

 

How did you work around this? I'm writing a routine that does much the same, and ran into much the same problem - once I send an Operation.Commit(), geometry

from drill points, and some contour lines disappears.

Link to comment
Share on other sites

How did you work around this? I'm writing a routine that does much the same, and ran into much the same problem - once I send an Operation.Commit(), geometry

from drill points, and some contour lines disappears. Actually, in one part, the Chains taken directly off the Solid Model disappeared, while a 2d line for contouring was spared.

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