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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

drawing program multiple states

SYNDAKIT
15-Moonstone

drawing program multiple states

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

ACCEPTED SOLUTION

Accepted Solutions

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



Martin Hanák

View solution in original post

20 REPLIES 20

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


Martin Hanák
SYNDAKIT
15-Moonstone
(To:MartinHanak)

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!

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


Martin Hanák
SYNDAKIT
15-Moonstone
(To:MartinHanak)

okay i just loaded it. and this looks like what I'm trying to do.

if I'm understanding what you have done here, then that means that you can have multiple states active at once.

the drawing program does not limit you to only one state being active at a time?

Is that correct?

the only difference i see between this example and my situation, is that I have an assembly as the default model.

I wonder if that is whats making my drawing act differently.

Hi,

if I'm understanding what you have done here, then that means that you can have multiple states active at once.

the drawing program does not limit you to only one state being active at a time?

Is that correct?

  • yes, you can activate multiple states at once

the only difference i see between this example and my situation, is that I have an assembly as the default model.

  • I think it is not important, that you have an assembly as the default model

Martin Hanak


Martin Hanák
SYNDAKIT
15-Moonstone
(To:MartinHanak)

Okay, just a couple more questions for you.

1. am i thinking about this backwards?- if i start with all views being displayed then create a state for each part where i "erase" all other views except that one.

example:

               state (show_part_1) - all views except detail (piece a) are erased.

               state (show_part_2)  - all views except detail (piece b) are erased

               state (show_part_3) - all views except detail (piece c) are erased.

so my thinking is

if a==true

set state show_part_1

endif

if b==true

set state show_part_2

endif

if c==true

set state show_part_3

endif

/******** in my mind the above statement and the below statement should yield the same results

if a==true & b==true & c==true

set state show_part_1

set state show_part_2

set state show_part_3

endif

Hi,

the following sequence does not make any sense, it erases all views.

set state show_part_1

set state show_part_2

set state show_part_3

Martin Hanak


Martin Hanák
SYNDAKIT
15-Moonstone
(To:MartinHanak)

ha ha ok thanks martin

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



Martin Hanák
SYNDAKIT
15-Moonstone
(To:MartinHanak)

Thanks Martin I really appreciate your help!

Hi, Martin

Sorry my ignorance, but exactly suppose to work your Drawing Program?

Thank you,

Nic.

Hi,

I do not understand your reply.

MH


Martin Hanák

Hi,

I have all the four views and I cannot manipulate them in any way. Is there something missing? An external command, a mapkey, something?

Nic.

Hi,

please attach your data and explain the problem in detailed way.

MH


Martin Hanák

Hi,

The data is your data: the four blocks A1-4 and the drawing. I cannot manipulate it in any way. I was expecting that some views will be deleted if you don't have some of the four models attached to the view. But I cannot change the drawing models because are related with existing views.

Is it possible to insert a custom symbol (the one in Annotate-Symbol-Custom Symbol) in a View State? All I could find in the Help was this:

To create detail items such as dimensions, notes, and balloon notes in a drawing state, choose Create from the DWG COMMANDS menu that appears when you click Tools > Drawing Program > Define States > Create State > Record Cmds. Items that you create in one state are not visible in any other state or outside of the drawing program

which doesn't reffer to Symbols but Dimensions, Notes, Balloons.

Nic.

Hi,

I tested my data and everything works as designed. This means >>> The view is erased when value of matching drawing parameter is set to 0. "Erase View" is the only action defined in drawing states.

Drawing program follows:

IF PAR_A1:D == 0

SET STATE STATE_A1

ENDIF

IF PAR_A2:D == 0

SET STATE STATE_A2

ENDIF

IF PAR_A3:D == 0

SET STATE STATE_A3

ENDIF

IF PAR_A4:D == 0

SET STATE STATE_A4

ENDIF

Concerning symbols, I hope it is possible to Show/Erase them. I do not know it is is possible to place symbol from symbol library.

MH


Martin Hanák

Ah, okay. I see now: you change the Par_A1-4 in the Drawing Parameters, manually. It works. Nice exercise, taught me something new but is not what I am looking for. I only have one assy with two simple parts.

As you said: I have to try and see what happens. I learned a lot by trying in the last week about Drawing Program.

So it could work if I put all the symbols I use on the drawing and then erasing them all besides the one/ones I want to use for every particular State View?

Nic.

SYNDAKIT
15-Moonstone
(To:nalexandru)

Since my OP on June 2015 I have learned much about these drawing programs, and have wanted to break some keyboards along the way. So if there is something I can help you out with just let me know and I will give it my best shot.

nalexandru
13-Aquamarine
(To:SYNDAKIT)

Hi,

I'm trying to understand something of this. There is no Tutorial or Hands-on Workshop for the Drawing Program.

That's why I created this topic:

Drawing Program User Guide, Tutorial and Hands-On Workshop

Could you please give a look and contribute to it for the others users that might use your experience.

In particular I am stuck with inserting a Custom Symbol in a View State (see the question in the topic above)

Thank you,

nic.

nalexandru
13-Aquamarine
(To:SYNDAKIT)

hi again

Have you used layers in your Drawing program. Seems like my inherited drawing uses ONLY layers to show/hide notes and symbols. And I don't know how to move around.

For example: in the drawing I attach i just want to modify that note in all the five languages of my drawing, update the parameters names and change position and fonts size.

All that for the five languages of my drawing.

is it possible?

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags