cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

how to play macro from relation

SOLVED
Highlighted
Amethyst

how to play macro from relation

I wish to review the main relation in my complex part and also relations putted into Footer feature to review and be able to stop the pro/program workflow, so my idea is to play a mapkey with several annotation using comment functionaluty in mapkeys and be able to resume the workflow when I want.

Question: how can I run the mpkey from relation script?

Tags (3)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to play macro from relation

Relations can't call mapkeys.  Relations simply process the lines inside them, top to bottom.

View solution in original post

19 REPLIES 19

Re: how to play macro from relation

Relations can't call mapkeys.  Relations simply process the lines inside them, top to bottom.

View solution in original post

Re: how to play macro from relation

Thanks Tom, this explain a lot, but maybe you have an idea how the best debug the workflow?

Changing lines in relations into comments is painful..

Re: how to play macro from relation

Hi,

 

I am sorry I do not understand your question. Please provide some examples (pictures with comments).


Martin Hanák

Re: how to play macro from relation

to comment a relation we need to use "/*" for example:

/********** WALL THICKNESS CALCULATION **********
/* FIRST  CALCULATE A NEW WALL THICKNESS TO TRY AND OBTAIN THE REQUIRED \
/*CAPACITY.
/* MAKE SURE IT IS NOT TOO BIG OR TOO SMALL.
/* THEN IF A WALL THICKNESS OVERRIDE IS SET, MAKE IT EQUAL THE OVERRIDE VALUE.
/*  IF A WALL THICKNESS OVERRIDE IS SET, SKIP OVER THE CAPACITY CHECK THAT \
/*TRIES TO CHANGE THE WALL THICKNESS
/* OTHERWISE IT MAY NOT GO GREEN.

/* WALL_THICKNESS MANUALLY SET
IF (WALL_THICKNESS_OVERRIDE >1)
WALL_THICKNESS = WALL_THICKNESS_OVERRIDE
ENDIF

and if you wish to check and review some conditions and see if during regenerations and update Creo run specific way or as I call it workflow (perhaps purly driven by Pro/Program) using this combination "/*" to switch on / off some part of relation script is really painful.

Maybe ther is some smart solution to visualize where we are in the process during regeneration as for example:

1° flow through the relation in PART script first

2° then follow each part feature (as in Pro/Program)

3° do what is in Footer at the end (I have here also long relation script for annotations wisible on screen to have them up to date)

4° user press regenerate if relations still adjusting some parameters like WALL_THICKNESS for example...

 

this is because I was thinking about using a mapkey raised by relations to see where is the process currently 🙂

Re: how to play macro from relation

Hi,

 

from your explanation I understand that sometimes you need to comment several relations. Maybe you can enclose these relations into IF command and use parameter to turn it on/off, for example:

/* set MYPAR1 = 0 to turn relations OFF

/* set MYPAR1 = 1 to turn relations ON

IF (MYPAR1 == 1)

  IF (WALL_THICKNESS_OVERRIDE >1)
  WALL_THICKNESS = WALL_THICKNESS_OVERRIDE
  ENDIF

ENDIF


Martin Hanák

Re: how to play macro from relation

thanks, but not exactly - I shown as just tad example of my relations in real I have something about 400 lines of relations partly locaded in main PART relations some in features and some in Footer features, so Pro/Program of my template is build from 5243 lines...

 

My need is to have something like breakpoints and have ability to set them as many I want without necessity to reprogramming the relations as you displayed so we are looking farther...

Re: how to play macro from relation

Hi,

 

so ... your model is complex and you cannot describe all its details using words, only. If you want to get information from user community, you have to provide Creo model for testing purposes. If you cannot upload your real part, you can create its simplified version.


Martin Hanák

Re: how to play macro from relation

if you have solution in maind how to add such breakpoint to stop running the regeneration process and also ability to resume the process = you have the knowledge and no parts example is needed for this Smiley Tongue

Re: how to play macro from relation

Hi,

 

1.) clicking Regenerate button starts regeneration process which is uninterruptible

2.) to simulate regeneration step by step, user can use Tools > Model Player

3.) a solution you are looking for is probably Toolkit application


Martin Hanák