Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Hello all,
I have a model that can have one of 2 different features that are controlled by a parameter and proprogram in the model. On the drawing side I have created 2 drawing states to add the unique dimensions to the drawing (one for each feature option). The drawing program looks like the following:
IF FLARE_FINISH:0 == NO
SET STATE START
ENDIF
IF FLARE_FINISH:0 == YES
SET STATE FINISH
ENDIF
where FLARE_FINISH:0 is the parameter in the model that controls the features in the model.
The day that I set this all up everything worked fine. I could switch the parameter back and forth and the model and dimensions would all change as expected. The next day upon opening the same files, one of the drawing states will not properly execute. The program says that is successfully parsed and if i edit the state and run the commands everything looks right until i regen the drawing and everything in the state disappears. The drawing program is used to set a few other states.
I am running Parametric 4 M080. Is this a creo bug or am I missing something?
Thanks in advance for your help!
Does Pro/Program code correctly maintain the session ID for the referenced models? When I define relations in an assembly to make changes to parameters in a component, the session IDs update from day to day but always refer to the correct model. I wonder if the same is true of drawings? I've not used Pro/Program in a drawing - is it possible to define the code without the ":0" suffix and see if it works correctly?
I'm just guessing here, based on past relations troubles.
Thanks for the suggestion. The proper session ID is pulling through each time. I also tried eliminating the if/ endif lines so it was just just a command to set the state and it didn't work. It appears that i must have done something to the state to prevent it from being executed properly. For now i will just delete the sate and make a new one. This is not the first time that I have had a state work initially and then stop functioning. I wish I knew what I am doing to cause the issue. Thanks again for taking the time to respond!
@BrianL wrote:
Hello all,
I have a model that can have one of 2 different features that are controlled by a parameter and proprogram in the model. On the drawing side I have created 2 drawing states to add the unique dimensions to the drawing (one for each feature option). The drawing program looks like the following:
IF FLARE_FINISH:0 == NO
SET STATE START
ENDIFIF FLARE_FINISH:0 == YES
SET STATE FINISH
ENDIF
where FLARE_FINISH:0 is the parameter in the model that controls the features in the model.
The day that I set this all up everything worked fine. I could switch the parameter back and forth and the model and dimensions would all change as expected. The next day upon opening the same files, one of the drawing states will not properly execute. The program says that is successfully parsed and if i edit the state and run the commands everything looks right until i regen the drawing and everything in the state disappears. The drawing program is used to set a few other states.
I am running Parametric 4 M080. Is this a creo bug or am I missing something?
Thanks in advance for your help!
Hi,
can you upload testing data set ?
Good Morning Martin,
I do not know what you mean by a "testing data set".
I have a suspicion that creating the dimensions in the state may be less stable than creating the dimensions on the drawing, hiding them, and then using the state to show the dimensions. I plan to proceed with this method and will reply back here if I run into a state not executing again.
Regards
@BrianL wrote:
Good Morning Martin,
I do not know what you mean by a "testing data set".
I have a suspicion that creating the dimensions in the state may be less stable than creating the dimensions on the drawing, hiding them, and then using the state to show the dimensions. I plan to proceed with this method and will reply back here if I run into a state not executing again.
Regards
Hi,
testing data set is set of Creo files created by you which enable me to reproduce the problem.
Unfortunately i cannot provide the data. I am not permitted to provide the files that contain the problem and since I don't know what I am doing to cause the problem I cannot recreate it on a generic part, sorry.