502,545 active members
5,955 visitors online
Register for free
Login
Page 1 of 2 12
Results 1 to 12 of 18
  1. #1
    Registered
    Join Date
    Aug 2009
    Posts
    17

    AlphaCam nesting multiple lists

    Hello,
    I have a lot of nesting lists prepared for some projects.
    Now I want to combine some of them together but there is no that option.
    I can only use parts to create new list but that it to much work to do.

    Anyone have a some macro or something for merging two or more nesting list?

    Thanks

  2. #2
    Registered
    Join Date
    Apr 2015
    Posts
    263

    Re: AlphaCam nesting multiple lists

    It is possible write it. In Vba directly in Alphacam or as some external application in .NET.

    If you interested about it let me know. I have many experience with this programming.

  3. #3
    Registered
    Join Date
    Aug 2009
    Posts
    17

    Re: AlphaCam nesting multiple lists

    Yes, after some research I created my own little software for merging lists.
    Actually, it is very easy. In the nest list file (if you open with notepad) you can see all structure of files and lists, after that is easy to create now or to merge, delete some items etc.

  4. #4
    Registered
    Join Date
    Aug 2009
    Posts
    17

    Re: AlphaCam nesting multiple lists

    Hello,
    I dont want to open new question because it is linked with this.
    I am creating nesting optimisation from Vb Net with following code and I can get qty of pieces from loaded nesting list.
    After some time I have error, please check code.
    This worked before, but I cannot solve this error for a couple of days. I tried reinstall all, but nothing.
    What I see that when I open Alphacam manualy and then run this code, it will work sometime.
    I tried this with AlphaCam version 2017 and 2019 and same error.


    Thanks



    Dim alp As New AlphaCAMRouter.App
    alp.Visible = True

    Dim Drw As AlphaCAMRouter.Drawing
    Dim Sheet As AlphaCAMRouter.Path

    Dim Nest As NestData

    Drw = alp.ActiveDrawing


    Nest = Drw.CreateNestData("c:\1.anl") ------ HERE IS ERROR: Exception thrown 'System.Runtime.InteropServices.COMException' in AplhaCamNesting.exe, Additional Information: Error HRESULT E_FAIL has been returned from a Call To a COM component.

    Sheet = Drw.CreateRectangle(0, 0, 2800, 2070)


    Nest.AddSheet(Sheet, Drw.Materials(1).Name, 0.25, 2)



    Nest.DoNest()

    Dim qty As Decimal = 0

    Dim col As AlphaCAMRouter.AcamColor = AcamColor.acamCYAN

    For a As Integer = 1 To Drw.ToolPaths.Count
    qty = qty + Drw.ToolPaths.Item(a).GetArea(AcamColor.acamBROWN)
    Next

  5. #5
    Registered
    Join Date
    Apr 2015
    Posts
    263

    Re: AlphaCam nesting multiple lists

    Quote Originally Posted by fikri View Post
    Hello,
    I dont want to open new question because it is linked with this.
    I am creating nesting optimisation from Vb Net with following code and I can get qty of pieces from loaded nesting list.
    After some time I have error, please check code.
    This worked before, but I cannot solve this error for a couple of days. I tried reinstall all, but nothing.
    What I see that when I open Alphacam manualy and then run this code, it will work sometime.
    I tried this with AlphaCam version 2017 and 2019 and same error.


    Thanks



    Dim alp As New AlphaCAMRouter.App
    alp.Visible = True

    Dim Drw As AlphaCAMRouter.Drawing
    Dim Sheet As AlphaCAMRouter.Path

    Dim Nest As NestData

    Drw = alp.ActiveDrawing


    Nest = Drw.CreateNestData("c:\1.anl") ------ HERE IS ERROR: Exception thrown 'System.Runtime.InteropServices.COMException' in AplhaCamNesting.exe, Additional Information: Error HRESULT E_FAIL has been returned from a Call To a COM component.

    Sheet = Drw.CreateRectangle(0, 0, 2800, 2070)


    Nest.AddSheet(Sheet, Drw.Materials(1).Name, 0.25, 2)



    Nest.DoNest()

    Dim qty As Decimal = 0

    Dim col As AlphaCAMRouter.AcamColor = AcamColor.acamCYAN

    For a As Integer = 1 To Drw.ToolPaths.Count
    qty = qty + Drw.ToolPaths.Item(a).GetArea(AcamColor.acamBROWN)
    Next

    Hi,

    try something like this.

    Not tested, write from a "hand´"

    Also do not forgot on a reference Alphacam nesting Type library

    Code:
    Dim drw As Drawing
    Set drw = App.ActiveDrawing
    
    
           
    
    
            Dim Sheet As Path
    
    
            Dim Nest As NestData
    
    
            Nest = drw.CreateNestData("C:\Alphacam\LICOMDIR\NestLists\1.anl")
    
    
            Set Sheet = drw.CreateRectangle(0, 0, 2800, 2070)
    
    
    
    
            Nest.AddSheet Sheet, "MDF", 0.25, 2
    
    
            Nest.DoNest
    
    
            Dim qty As Double
            qty = 0
    
    
            Dim col As AcamColor
            col = AcamColor.acamCYAN
    
    
            Dim a As Integer
            For a = 1 To drw.ToolPaths.Count
                qty = qty + drw.ToolPaths.Item(a).GetArea(AcamColor.acamBROWN)
            Next

  6. #6
    Registered
    Join Date
    Aug 2009
    Posts
    17

    Re: AlphaCam nesting multiple lists

    Yes, this code is working directly from AlphaCam VBA, but I need it to run from VB NET, because I have another code I must use for saving data, other calculation.. to much work to convert all to VBA.
    Thanks

  7. #7
    Registered
    Join Date
    Apr 2015
    Posts
    263

    Re: AlphaCam nesting multiple lists

    Ahh ok. Sorry . I did not checked code perfectly.

    Let me open it in Visual Studio.

  8. #8
    Registered
    Join Date
    Apr 2015
    Posts
    263

    Re: AlphaCam nesting multiple lists

    Quote Originally Posted by fikri View Post
    Yes, this code is working directly from AlphaCam VBA, but I need it to run from VB NET, because I have another code I must use for saving data, other calculation.. to much work to convert all to VBA.
    Thanks
    There you have your project. You have to add reference to a AcamNest.

    Then is result code like this (without any others exception ...... )



    Dim alp As New AlphaCAMMill.App
    alp.Visible = True


    Dim Drw As AlphaCAMMill.Drawing
    Dim Sheet As AlphaCAMMill.Path


    Dim Nest As ACAMNESTLib.INestData


    Drw = alp.ActiveDrawing




    Nest = Drw.CreateNestData("C:\Alphacam\LICOMDIR\NestLists \1.anl")
    Sheet = Drw.CreateRectangle(0, 0, 2800, 2070)
    Nest.AddSheet(Sheet, Drw.Materials(1).Name, 0.25, 2)
    Nest.DoNest()


    Dim qty As Decimal = 0
    Dim col As AlphaCAMMill.AcamColor = AlphaCAMMill.AcamColor.acamCYAN


    For a As Integer = 1 To Drw.ToolPaths.Count
    qty = qty + Drw.ToolPaths.Item(a).GetArea(AlphaCAMMill.AcamCol or.acamBROWN)
    Next



    https://www.dropbox.com/sh/8vj8rx8p5...VWrgjjTSa?dl=0

  9. #9
    Registered
    Join Date
    Aug 2009
    Posts
    17

    Re: AlphaCam nesting multiple lists

    Thanks for code.
    However, I cannot add library from 2017, 2018 or 2019 version.
    There is message: Please make sure that file is accesible and that is valid assembly or com component.
    I tried library from ...add-ins/nesting/AcamRadnest.dll
    I can do it just for 2016 version, which is 32 bit, but newer Router or Mill is 64 bit version?

    With your project is same error. Same error is when I tried Mill or Router.

  10. #10
    Registered
    Join Date
    Apr 2015
    Posts
    263

    Re: AlphaCam nesting multiple lists


    Yes newest are 64 bit. Im using 19 and without problem. Can you share your VS project?

  11. #11
    Registered
    Join Date
    Aug 2009
    Posts
    17

    Re: AlphaCam nesting multiple lists

    Hello,
    I think that this is problem because of system or something else.
    I don't know why is reason that I cannot tick reference 64 bit but I can do it with 32 bit?

  12. #12
    Registered
    Join Date
    Apr 2015
    Posts
    263

    Re: AlphaCam nesting multiple lists

    Quote Originally Posted by fikri View Post
    Hello,
    I think that this is problem because of system or something else.
    I don't know why is reason that I cannot tick reference 64 bit but I can do it with 32 bit?
    Which Windows you have 32 or 64 bit?

Page 1 of 2 12

Similar Threads

  1. help with nesting using alphacam
    By Benaiah in forum Alphacam
    Replies: 8
    Last Post: 07-07-2016, 01:08 PM
  2. Artcam Nesting is not real part nesting.
    By piratebrian in forum ArtCam Pro
    Replies: 1
    Last Post: 04-25-2016, 08:24 PM
  3. Alphacam nesting, turn off numbers?
    By ronthomp in forum Alphacam
    Replies: 7
    Last Post: 01-06-2015, 09:27 PM
  4. multiple sheet nesting and toolpathing
    By redvanth in forum Vectric
    Replies: 22
    Last Post: 10-04-2011, 09:58 PM
  5. Multiple sheet nesting and toolpath
    By redvanth in forum EnRoute
    Replies: 0
    Last Post: 08-31-2011, 11:57 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •