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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Pro programming user guide

Ketan_Lalcheta
19-Tanzanite

Pro programming user guide

Has anyone come across user manual or any help file of pro program?

Regards

Ketan

35 REPLIES 35
nalexandru
13-Aquamarine
(To:TomU)

Tom, you are absolutely right. I shouldn't touch somebody's work until I FULLY understand it. Unfortunately here I have the limit of 80 characters which I cannot split on the contrary of Pro/Program.

Even the person who initially did the job had a mistake with a couple of lines. For a fortunate series of events, that instances have rarely occurred.

Now I'm trying to remember from school the use of logical expression. I think I could say that the expression

IF PAR == "1" | PAR == "2" | PAR == "3" | PAR == "4"

IF RAP == "A" | RAP == "B"

SET STATE MY_STATE

ENDIF

ENDIF

I could split it in eight blocks

IF PAR == "1"

IF RAP == "A"

SET STATE MY_STATE

ENDIF

ENDIF

IF PAR == "1"

IF RAP == "B"

SET STATE MY_STATE

ENDIF

ENDIF

IF PAR == "2"

IF RAP == "A"

SET STATE MY_STATE

ENDIF

ENDIF

IF PAR == "2"

IF RAP == "B"

SET STATE MY_STATE

ENDIF

ENDIF

IF PAR == "3"

IF RAP == "A"

SET STATE MY_STATE

ENDIF

ENDIF

IF PAR == "3"

IF RAP == "B"

SET STATE MY_STATE

ENDIF

ENDIF

IF PAR == "4"

IF RAP == "A"

SET STATE MY_STATE

ENDIF

ENDIF

IF PAR == "4"

IF RAP == "B"

SET STATE MY_STATE

ENDIF

ENDIF

There are only TWO PARAMETERS: PAR and RAP and one View State.

Is there something that seems wrong above? Is there any variant to combine two of the blocks?

And I still can't find some help for Drawing Program and View States. I thing I should experiment by myself as Martin said.

Nic.

Hi,

I do not understand why you are still solving IF command. From my point of view, situation is clear.

  • In case that whole IF command is < 80 characters there is no need to split it.
  • In case that whole IF command is > 80 characters you must split it.

MH


Martin Hanák
TomU
23-Emerald IV
(To:nalexandru)

I would say the first version is probably the best, but if you can't fit everything in 80 characters then you will have to split it up.

There is nothing wrong with the 8 individual versions, but you could simplify them some if you want to.  For example:

IF PAR == "4" & RAP == "B"

    SET STATE MY_STATE

ENDIF

If line length allows you could also just drop down to 4 versions.  For example:

IF PAR == "1"

    IF RAP == "A" | RAP == "B"

        SET STATE MY_STATE

    ENDIF

ENDIF

Finally, it will make it less readable, but you could always convert the values your comparing on to something shorter.  This will help you avoid the line length restrictions.  For example:

/* Set BS equal to an integer representing it's actual value

BS = 0

IF BSHAPE:1 == "TRUNCATED"

    BS = 1

ENDIF

IF BSHAPE:1 == "TRUNCATED

    BS = 2

ENDIF

IF BSHAPE:1 == "TRUNCATED WITH INCL"

    BS = 3

ENDIF

/* Now do the comparison with the shorter values.

IF BS == 1 | BS ==2 | BS == 3

    SET STATE MY_STATE

ENDIF

/* Since you've switched to integer values, you can also do math comparisons

IF BS >= 1 & BS <= 3

    SET STATE MY_STATE

ENDIF

Hopefully that gives you some ideas. 

nalexandru
13-Aquamarine
(To:TomU)

Thank you, Tom.

Yes, you gave me some ideas but I supposed the most readable version, for the people that will touch the model after me especially, is the longest one. It is simple, clear, divided in easy to read and understand blocks and is long (the only downside of this solution).

Nic.

What Ben Loosi said Re: Pro programming user guide

Here is the guide from Widlfire 2.0.  http://www.datajett.com/Cadd/ProE/Wildfire_Help/program.pdf

There was a guide from Wildefire 4.0 but can't find that one.  However, they are basically the same.

Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags