Newbie Making new user interface with sprut4


Results 1 to 5 of 5

Thread: Making new user interface with sprut4

  1. #1
    Registered
    Join Date
    Jan 2017
    Location
    Korea, Republic Of
    Posts
    3
    Downloads
    0
    Uploads
    0

    Question Making new user interface with sprut4

    Hello

    I'm using sprutcam 10 in south korea and I want to make a tool for making job easier.

    Is it possible to make new UI for sprutcam with Sprut4?

    I found 'inputcombo' and 'inputedit' functions in sprut4 manual, but they have very limited usage.

    I programmed simple script that can select geometry for job assignment

    if I want to use buttons and more input boxes, how can I add them into sprutcam?




    If sprut4 hasn't function that I need, Is there any possible way to do?


    script codes are here ▼


    Code:
    module
    
    
    uses
       STSprutCAM, STApplication, STOperationTypes,
       ST_ISSModelFormerTypes, STTreeTypes, STGeomModelTypes, sttypes;
       
    procedure run;
    
    
    implementation
    
    
    var
      app: TST_Application
      SCAMApp: IST_Application
      CProject : IST_Project;
      //Project
      CFullModel: ISS_FullModel;
      //FullModel
      CModelRoot : ISS_TreeNode;
      //CModelRoot
      CGeomTreeNode : ISS_GeomTreeNode;
      
      CTechn : ISS_Technologist;
      //Technologist 
      CRootGroup : ISS_RootGroup;
      //RootGroup
      CAbsTecOp : ISS_AbstractTechOp;
      CModelFormers: ISS_ModelFormers;
      CAbsModelF : ISS_AbstractModelFormer;
      CJobModelF : ISS_JobModelFormer;
      CModelItem : ISS_ModelItem;
      CGeomModel : ISS_GeomModel;
      
      A : integer;  
      B : string_array50;
      C : string;
      TestGeoItem : ISS_GeometryItem;
      TestGeoModel :ISS_GeomModel;
      
      Text_Node_Data : string_array50;
      Temp_Node_numb : integer;
      Temp_Folder_numb : integer;
      Temp_GeomModel : ISS_GeomModel;
      Temp_GMname : string;
      GeomNode_movable : ISS_GeomTreeNode;
      Temp_Combo_numb : integer;
      Geom_Set_Tree : ISS_TreeNodes;
      Geom_tree_index : array 50 of integer;
      
      tempvar_i : integer;  
    
    
    
    
    procedure run;
    begin
    app = TST_Application.Create;
    SCAMApp = app.SprutCAMApp;
    CProject = SCAMApp.Get_CurrentProject;
    CFullModel = CProject.Get_FullModel;
    CModelRoot = CFullModel.Get_Root;
    CTechn = CProject.Get_Technologist;
    CRootGroup = CTechn.Get_RootOp;
    CAbsTecOp = CRootGroup.Get_Operation(0);
     
    if(CRootGroup.Get_Count <> 0) 
    then begin 
    CModelFormers = CAbsTecOp as ISS_ModelFormers;
    CAbsModelF = CModelFormers.Get_MFormer(7);
    CJobModelF = CAbsModelF as ISS_JobModelFormer;
    CModelItem = CAbsModelF.Get_Rec(0);
    CGeomTreeNode = CModelRoot.Get_LastSibling as ISS_GeomTreeNode;//2D geometry
    
    
    Geom_Set_Tree = CFullModel.Get_Tree;
    
    
    
    
    
    
    Temp_Node_numb=CGeomTreeNode.Get_DirectChildCount;
    Temp_Folder_numb=CGeomTreeNode.Get_FolderCount;
    
    
    //print(Temp_Folder_numb);
    
    
    
    
    
    
    GeomNode_movable = CGeomTreeNode.Get_LastChild as ISS_GeomTreeNode;//XZ-ZX plane
    
    
    
    
    while Temp_Node_numb > 0 do begin
    
    
    Temp_GeomModel=GeomNode_movable.Get_Data;
    Temp_GMname=Temp_GeomModel.Get_Name;
    Text_Node_Data[0]=Temp_GeomModel.Get_Name;
    //print(Temp_Node_numb);
    //print(Temp_GMname);
    
    
    
    
    Geom_tree_index[0]=Geom_Set_Tree.GetIndex(GeomNode_movable);
    print(Geom_Set_Tree.GetIndex(GeomNode_movable));
    
    
    tempvar_i=1;
    
    
    while Temp_Node_numb-tempvar_i > 0 do begin
    GeomNode_movable=GeomNode_movable.Get_PrevSibling as ISS_GeomTreeNode;
    Temp_GeomModel=GeomNode_movable.Get_Data;
    Temp_GMname=Temp_GeomModel.Get_Name;
    Text_Node_Data[tempvar_i]=Temp_GeomModel.Get_Name;
    Geom_tree_index[tempvar_i]=Geom_Set_Tree.GetIndex(GeomNode_movable);
    tempvar_i=tempvar_i+1;
    //print(tempvar_i);
    //print(Temp_GMname);
    //print(Geom_Set_Tree.GetIndex(GeomNode_movable));
    end
    
    
    Temp_Combo_numb=input_combo('Select Geometry Model',Text_Node_Data,0);
    GeomNode_movable=Geom_Set_Tree.GetByIndex(Geom_tree_index[Temp_Combo_numb]) as ISS_GeomTreeNode;
    Temp_Node_numb=GeomNode_movable.Get_DirectChildCount;
    Temp_Folder_numb=GeomNode_movable.Get_FolderCount;
    //print(Temp_Folder_numb);
    //print(Temp_Node_numb);
    if(Temp_Node_numb>0)then 
    begin
    GeomNode_movable=GeomNode_movable.Get_LastChild as ISS_GeomTreeNode;
    
    
    for tempvar_i=0 to len(Text_Node_Data)-1 do Text_Node_Data[tempvar_i]='';
    for tempvar_i=0 to len(Geom_tree_index)-1 do Geom_tree_index[tempvar_i]=0;
    
    
    end
    //print(Temp_Combo_numb);
    end
    
    
    Temp_GeomModel=GeomNode_movable.Get_Data;
    Temp_GMname=Temp_GeomModel.Get_Name;
    
    
    if(input_edit(Temp_GMname+' : Y/N')='Y')then
    begin
    CGeomModel = GeomNode_movable.Data;
    
    
    CGeomModel.Set_Selected(WordBool(true));
    //print(CGeomModel.Get_Name);
    //print(CModelRoot.Get_DirectChildCount);
    CJobModelF.AddCurvesSelected;
    CGeomModel.Set_Selected(WordBool(false));
    
    
    
    
    //TestGeoItem = CModelItem as ISS_GeometryItem;
    //TestGeoModel=TestGeoItem.GM;
    //TestGeoModel=TestGeoModel.Get_Parent;
    //TestGeoModel=TestGeoModel.Get_Parent;
    //print(TestGeoModel.Get_Name);
    end
    
    
    end
    else input_edit('no operation');
    
    
    
    
     
    SCAMApp = nil;
    app.Destroy;
    app = nil;
    end
                  
    end


    Similar Threads:
    Attached Thumbnails Attached Thumbnails Making new user interface with sprut4-i1-jpg   Making new user interface with sprut4-i2-jpg   Making new user interface with sprut4-i3-png   Making new user interface with sprut4-i4-png  

    Making new user interface with sprut4-i5-jpg   Making new user interface with sprut4-i6-jpg  


  2. #2
    Registered Nelly_SprutCAM's Avatar
    Join Date
    Jul 2016
    Location
    Russian Federation
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default Re: Making new user interface with sprut4

    Hello.
    That's just great what you have done! And we thank you for a deep dive into SprutCAM.
    Could you please clarify which parts of UI you want to update? (you can write in private message or to support mail)
    That's really interesting topic for us.

    FYI:
    Script section in the main manual
    SprutCAM 10 User Guide

    Sprut4 description:
    Sprut4 help project

    SprutCAM API http://www.sprutcam.com/files/docume...tml/index.html

    Last edited by Nelly_SprutCAM; 01-18-2017 at 03:18 AM.


  3. #3
    Registered
    Join Date
    Jan 2017
    Location
    Korea, Republic Of
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: Making new user interface with sprut4

    Thanks to your kind reply.


    I saw this video ->

    after I saw the video, I want to make selecting script like that.

    In that video, the script uses ini file, but I want to end it with dialogue box in sprutcam.

    In the Post-processor generator <INPUT> function can show multiple input boxes.

    I need the function like <INPUT>.


    Making new user interface with sprut4-i01-jpg

    this is what I want. all input boxes in One Dialogue.

    you can use some image and It will be look great, but I don't want it. (It will be a hard work for me)



    I saw Sprut4 IDE help manual and Sprutcam API. ( thank you again Nelly )

    but they are not for beginners and I don't know how to use dll files.(because I'm not good at programming languages)

    Should I learn VB or C to make dll?



  4. #4
    Registered Nelly_SprutCAM's Avatar
    Join Date
    Jul 2016
    Location
    Russian Federation
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default Re: Making new user interface with sprut4

    The project from video is done by the help of example, that we have in SprutCAM.
    It's plased on your PC: C:\Users\Public\Documents\SprutCAM\Version 10\Projects\Examples\Sprut\color_script(test).stc
    You can open it, and make visible expert tools in SprutCAM System setup window:
    Making new user interface with sprut4-img_18012017_113452-jpg

    After that, press on Scripts IDE. Some scripts are already done for the project, so you can use them by loading them from the direction: C:\Users\Public\Documents\SprutCAM\Version 10\Projects\Examples\Sprut\Scripts
    Here you can change all the parameters that you need.

    If you want, to make something different or something isn't working out about this question, please, write to our support mail: support@sprutcam.com with the topic "Script" and even Skype contact (if you have) to contact you to help with the question directly.

    In folder: C:\Users\Public\Documents\SprutCAM\Version 10\Projects\Examples\Sprut you can find some test files and also two video files, that are based on the test files as examples.

    And here's the video from SprutCAM with the example:






  5. #5
    Registered
    Join Date
    Jan 2017
    Location
    Korea, Republic Of
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default

    Thank you so much

    I should find the example file.



    If this little project is done, I'll share the result.

    Wish me luck



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Making new user interface with sprut4

Making new user interface with sprut4