experts at pro program......
experts at pro program......
(OP)
hi,
im creating an assembly based around pro prog.
I have 4 different prts, each created into 1 interchange group.
Although one one the 4 parts has also an interchange group.
How can tis be written in pro prog?
ill use a silly example....................
for image see....
http://proecentral.com/portal/forum/msgDetail.asp?msg_id=2544&for_id=15
eg first interchange group = 4 components
the 4th component eg the pentagon is also an interchange group, it can either be a hexagon or square.
below is what ive for the 4 component interchange group
INPUT
INTERCHANGE NUMBER
"enter choice of object (1=circle, 2=rectangle, 3=triangle, 4=pentagon"
END INPUT
RELATIONS
IF INTERCHANGE==1
object_name= "circle.prt"
ELSE
IF INTERCHANGE==2
object name= "rectangle.prt"
ELSE
IF INTERCHANGE==3
object_name= "triangle.prt"
ELSE
IF INTERCHANGE==4
object_name= "pentagon.prt"
ENDIF
ENDIF
ENDIF
ENDIF
END RELATIONS
This works fine... i just dont know how to add the second interchange group on the pentagon??
im creating an assembly based around pro prog.
I have 4 different prts, each created into 1 interchange group.
Although one one the 4 parts has also an interchange group.
How can tis be written in pro prog?
ill use a silly example....................
for image see....
http://proecentral.com/portal/forum/msgDetail.asp?msg_id=2544&for_id=15
eg first interchange group = 4 components
the 4th component eg the pentagon is also an interchange group, it can either be a hexagon or square.
below is what ive for the 4 component interchange group
INPUT
INTERCHANGE NUMBER
"enter choice of object (1=circle, 2=rectangle, 3=triangle, 4=pentagon"
END INPUT
RELATIONS
IF INTERCHANGE==1
object_name= "circle.prt"
ELSE
IF INTERCHANGE==2
object name= "rectangle.prt"
ELSE
IF INTERCHANGE==3
object_name= "triangle.prt"
ELSE
IF INTERCHANGE==4
object_name= "pentagon.prt"
ENDIF
ENDIF
ENDIF
ENDIF
END RELATIONS
This works fine... i just dont know how to add the second interchange group on the pentagon??





RE: experts at pro program......
Ive been playing around with this (for a while) because I think it is something we will need. And I have come up with the following.
I created 5 parts a, b, c, d and e.
I created an interchange assembly of a, b and c.
I created an interchange assembly of d and e.
I created a sub assy (for d & e) called sub.
I created an assy for (a b & c) called asy.
In sub, add this
INPUT
WHICH number
END INPUT
In asy add component a, twice and sub, and add the following:
INPUT
CHOICE NUMBER
END INPUT
RELATIONS
WHICH=CHOICE
IF CHOICE==1
OBJECT_NAME= "A.prt"
ELSE
IF CHOICE==2
OBJECT_NAME= "B.prt"
ELSE
IF CHOICE==3
OBJECT_NAME= "C.prt"
ELSE
IF CHOICE==4
OBJECT_NAME="D.prt"
ELSE
IF CHOICE==5
OBJECT_NAME="E.prt"
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
EXECUTE ASSEMBLY SUB
WHICH = CHOICE
END EXECUTE
ADD PART A
INTERNAL COMPONENT ID 27
END ADD
IF CHOICE<4
ADD PART (OBJECT_NAME)
INTERNAL COMPONENT ID 58
END ADD
END IF
IF CHOICE>3
ADD SUBASSEMBLY (OBJECT)
INTERNAL COMPONENT ID 43
END ADD
END IF
I know this isn't exactly what you are after but I would imagine if you leave out the second component a this would still work. I will have a go at this in a minute.
Hope this is of help.
Don't hesitate to get back if there are any problems.
maybe only a drafter
but the best user at this company!
RE: experts at pro program......
But im going to go back to it now and test out your theories!
Many thanks for your time!
Also can you give me the basics of adding execute statements?..... Another problem for you....
on my last example,
i created an assembly with the interchange group....
and a sub assembly with an interchange group, but how do you add an execute statement to pass the pro/prog from the sub assembly to the main assembly?
Once again many thanks
RE: experts at pro program......
What we have done on assemblies is have some parts as indiviuals and some sub assemblies. We haven't done much on this but I think the trick is as follows:
Have all you inputs in the usual way.
Execute the parts just after the relations.
But for the assembles you need to put the execute statement after the add subassembly....
In here you will need to answer all the input questions for all parts.
e.g.
This example has two parts (A and B) and a sub-assembly consisting of (C & D), all with some parametric dimensions.
INPUT
a_len number
a_depth number
b_len number
b_depth number
c_len number
c_depth number
d_len number
d_depth number
END INPUT
RELATIONS
END RELATIONS
EXECUTE PART A.prt
len=a_len
depth=a_depth
END EXECUTE
EXECUTE PART B.prt
len=b_len
depth=b_depth
END EXECUTE
.
.
.
ADD SUB ASSEMBLY C_D_ASSY
INTERNAL COMPONENT...
END ADD
EXECUTE ASSEMBLY C_D_ASSY.asy
len_c=c_len
depth_c=c_depth
len_d=d_len
depth_d=d_depth
END EXECUTE
The left hand side of the execute should be the same as ths inputs from the sub assembly.
Hope this heplps!
maybe only a drafter
but the best user at this company!