584,846 active members*
4,582 visitors online*
Register for free
Login
IndustryArena Forum > CAM Software > Alphacam > AlphaCam nesting multiple lists
Results 1 to 18 of 18
  1. #1
    Join Date
    Aug 2009
    Posts
    18

    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
    Join Date
    Apr 2015
    Posts
    327

    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.
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  3. #3
    Join Date
    Aug 2009
    Posts
    18

    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
    Join Date
    Aug 2009
    Posts
    18

    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
    Join Date
    Apr 2015
    Posts
    327

    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
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  6. #6
    Join Date
    Aug 2009
    Posts
    18

    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
    Join Date
    Apr 2015
    Posts
    327

    Re: AlphaCam nesting multiple lists

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

    Let me open it in Visual Studio.
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  8. #8
    Join Date
    Apr 2015
    Posts
    327

    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
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  9. #9
    Join Date
    Aug 2009
    Posts
    18

    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
    Join Date
    Apr 2015
    Posts
    327

    Re: AlphaCam nesting multiple lists


    Yes newest are 64 bit. Im using 19 and without problem. Can you share your VS project?
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  11. #11
    Join Date
    Aug 2009
    Posts
    18

    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
    Join Date
    Apr 2015
    Posts
    327

    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?
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  13. #13
    Join Date
    Aug 2009
    Posts
    18

    Re: AlphaCam nesting multiple lists

    Quote Originally Posted by Maroslav4 View Post
    Which Windows you have 32 or 64 bit?

    64 bit. I am not sure that is possible to install latest versions on 32 bit system?

  14. #14
    Join Date
    Apr 2015
    Posts
    327

    Re: AlphaCam nesting multiple lists

    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  15. #15
    Join Date
    Aug 2009
    Posts
    18

    Re: AlphaCam nesting multiple lists

    Well, actually I am trying that. Will see ..
    Thanks for time.

  16. #16
    Join Date
    Aug 2009
    Posts
    18

    Re: AlphaCam nesting multiple lists

    Well. Nothing yet.
    I tried it on another pc and same problem.
    Different is that I can add reference but while running code error message appears.
    I founded one trick, if AlphaCam is already running if I run my code everything is ok.

  17. #17
    Join Date
    Apr 2015
    Posts
    327

    Re: AlphaCam nesting multiple lists

    Yes that what i wrote "without any exception". I will have time end of this week so i will send you absolutely correct code. If you wrting code you have to also take a lot of other things into account. also take a lot of other things into accountalso take a lot of other things into account
    Alphacam post and VBA macros, Autodesk HSM post.
    www.cadcam-softcz.cz

  18. #18
    Join Date
    Aug 2009
    Posts
    18

    Re: AlphaCam nesting multiple lists

    I can use it only when Alphacam is already started before, but now I must after each optimisation close AlphaCam, start again, and then run code again, which is very slow, need about 20 sec per one optimisation.
    Is there any way to clear nesting list so I do not need to close Alphacam, just start next optimisation? I want to load next one, but I cannot clear previous? Something like Clear Memmory manualy?
    When I start new app, everything should be cleared but why not?

    Thanks

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
  •