Skip to main content
15-Moonstone
June 16, 2015
Solved

drawing program multiple states

  • June 16, 2015
  • 1 reply
  • 11348 views

Hi all,

 

     I have been trying to get this drawing program to work out, but it seems that it has gotten the better of me.

 

So here's the deal, I have an assembly that has about 7 different configurations. Only about 2 of these are children, and the others can be any number of combinations.

For example

( i will refer to the parts as letters and the states as numbers)

 

parts: a, b, c, d, e, f, g

possible states:  a, ab, abc, abcd, abcde, abcdef, abcdefg

                         b, bc, bcd, bcdf, bcdfg.... and so on and so forth....

 

so here is my question.

 

if i define a state (a) as all the root parts plus an extra view (a),

then another as state (b) as all the root parts plus an extra view (b)

...... and so on..

 

can I do this?

 

if a

     set state (a)

else if a & b

     set state (a)

     set state (b)

else if a & b & c

     set state (a)

     set state (b)

     set state (c)

else

set state (z)

endif

 

() are just extra that wouldn't be the actual name of the state.

* I get the feeling that the drawing program can only set one state at a time but I can't find much documentation online about this.

 

maybe i might have to nest?

if a

     if a & b

          if a & b & c

               set state (a)

               set state (b)

               set state (c)

               endif

     set state (a)

     set state (b)

set state (a)

else

set state (z)

endif

 

 

so yeah anyone that could help me out getting a handle on this drawing program thing I really would appreciate it.

 

If this example isn't clear i can be more descriptive if necessary.

 

thanks for reading

Best answer by MartinHanak

Just a note... you can erase all views by default and show them using drawing states.


1 reply

24-Ruby III
June 16, 2015

Hi,

I think that the purpose of drawing program is to turn on/off drawing items (eg. views, notes, ...) according to drawing parameter values. Drawing program is not able to switch between assembly representations.

It seems to me that your idea is too complicated.

Martin Hanak

SYNDAKIT15-MoonstoneAuthor
15-Moonstone
June 16, 2015

Martin,

     Im not that smart of a person, but i have been around this community long enough to know you definitely know that you have much more experience with Creo. You have helped me many times, both directly through my post and indirectly through reading other peoples post.

     with that said, i have a follow up question to your response.

i know that, in addition to erasing dimensions and notes, i can both "erase" and "show" drawing views in any given state.

I feel that I should also clarify my situation; I am not using representations. instead the "views" that i refer to are actually just parts of the assembly that i have isolated("set/add drawing model"). so that's what i call a view.

also i messed up in the original post.

i said i would refer to states as numbers so following the "set state()" this should be a number not a letter

thanks for you replies martin!

24-Ruby III
June 16, 2015

Hi,

I created an example in Creo 2.0.

  • drawing contains 4 drawing models ... a1, a2, a3, a4
  • drawing contains 4 parameters ... par_a1, par_a2, par_a3, par_a4
    • these parameters work as switches for drawing views ... 0 => view is erased, 1 => view is displayed
  • drawing contains 4 states ... state_a1, state_a2, state_a3, state_a4
    • if state is activated, then view is erased
  • drawing programs activates state, when parameter value is set to 0

Martin Hanak