hexagon logo

Subroutine issues

Hi,

First time i use subroutines.
I have one part to measure in different positions so i've made 2 programs with 2 different CAD orientation.
Now i've made a third programm to recall both programs but:

- CAD doesn't show up in the main program, i have to remember where i have to probe...
- in the 2 programs i have operator comments with pictures showing the jigs to use --> the pictures doesn't appear in the main program.
- it is not possible to run only one program at a time, i have to suppress the subroutine lines to make it work, and i can't mark/unmark these lines.

Do you have some solutions for these 3 points ?

Thanks.
  • if you're writing one program with multiple cad orientations you want to sue viewsets.

    Procedure is-->

    1) import model_1. write program
    2) import model_2. say YES treat as an assembly. go into cad assembly tree, uncheck (hide) model_1 and write your program for model_2.
    3) repeat step 2 for model_3.
    4) once your program(s) are all written into the one measurement routine, go to the very top of your routine, only show model_1 and CREATE a VIEWSET. next only show model_2 and CREATE a VIEWSET. next only show model_3 and CREATE a VIEWSET.
    5) at the top of the code for program 1 RECALL VIEWSET for model_1. at the top of the code for program 2 RECALL VIEWSET for model_2. at the top of the code for program 3 RECALL VIEWSET for model_3.
  • Hm ok, but the 2 programs are already written.
    Can i just open the first program, import again the model, copy/past the data of the second prog, then do the viewset stuff ?
    because when i import the second model, i have to transform it to have the right orientation, but even when unckecking the first model, both models are moving.

    Edit: i only have the choice to merge or not the model, no choice to treat as assembly.
  • Hm ok, but the 2 programs are already written.
    Can i just open the first program, import again the model, copy/past the data of the second prog, then do the viewset stuff ?
    because when i import the second model, i have to transform it to have the right orientation, but even when unckecking the first model, both models are moving.


    I didn't know you were an expert on this stuff!

    My bad just do whatever you want thenSlight smile
  • I've never used viewsets, and not easy to find all what you talk about in a french language software Rolling eyes
    Anyway OK i've created the 2 viewsets in the assembly menu and found the way to rotate only the selected model, now searching how to recall viewsets...
  • Insert/Report Command/Create Viewset
    Insert/Report Command/Recall Viewset

    speaks French maybe he can hop on & help you with anything that may be getting lost in translation
  • I've never used viewsets, and not easy to find all what you talk about in a french language software Rolling eyes
    Anyway OK i've created the 2 viewsets in the assembly menu and found the way to rotate only the selected model, now searching how to recall viewsets...


    How do you do it so that you are only rotating the selected model? I transformed a model and clicked the "keep original" box, but even after I hide the original model in the CAD assemblies, the original model still gets rotated when I try to rotate the second model.
  • I use 'Assembly' it's the cube with the puzzle piece on 'CAD SETUP' ribbon. You can select which model you want to work with to translate when you have multiple.
  • Yes, I found the CAD Assembly button, but it just won't work for me. Whenever I hide one and transform another, the original is still transformed. Is there any way to lock a CAD assembly so that it doesn't get transformed, but you can still transform others?
  • It's not a question of which is visible.

    In the CAD assembly window, right click on the one you want to transform and select 'Transform,' to change just that part of the assembly.