This is my problem : I want tot interchange parts or components however u like in an assembly. I want this to be possible with just entering the string name of the part in the message window. As an example : Say u have a knife, fork and a spoon. The handle is the constant factor and the upper part is the variable factor to be interchanged. All the assemblies and parts are in the same folder. I have searched the forum, but wasn`t able to find the correct solution. In the help center of Pro-E>fundamentals>program>replacing components in assembly design, there is an explanation. But I haven`t been able to get it to work yet. ps. I`m working with WF3. Serious thanks for the right answer :), good luck. Jelmer This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Hi, I think about a solution. one is : You can add the two parts in the correct place. Be sure these parts have no children . you create your parameter and assign value (1st for example) then go in the pro programm and add at the right place the condition if parameter == xxxxx add part AAAA .... end add endif Do the same for the others if parameter == yyyyy add part (subassy) BBBB .... end add endif save and regenerate test with changing the value parameter normaly it works.
You can use Pro/Program along the lines that Bruno suggested. Once you are familiar with it, a lot can be done with very little effort. You might also want to explore Interchange Assemblies, also called Interchange Groups. There are three types: Functional (which sounds as if it is what you want), Simplify (replacing a complex sub-assembly with a blob), and Consolidated (which combines the other two). Look it up in the regular help files under the Assembly heading. A really dumb and easy way to do this sometimes is to assemble everything you want in a regular assembly (coordinate system might be particularly handy for assembly), then suppress the parts you don't want. Then you can do SaveAs for different states, or create Simplified Rep instances.
I agree with David about using Interchangeable Assy. The trick is to create the TAG as a common location for all mating assy. I'd avoid Pro/Program as the front-end unless you're trying to debug the assy.
Guys, thanks for the replies so far. I`m still in fever to use pro/program for this issue. As I could prompt for the different components in the message window with the INPUT section of Program. I had also thougth about the dumb and easy way David explained, but I`ll only go for that when all other options fail. Jelmer
Ok, I`m a bit stuck in the Pro/Program file. This is how I`ve set it up : INPUT topeye string END INPUT if topeye = design1 !*** ERR: line contains a bad symbol or is otherwise invalid ADD SUBASSEMBLY 71-52-07-046-0 INTERNAL COMPONENT ID 52 PARENTS = 39(#5) 42(#6) END ADD end if Lower down in the listing : ADD SUBASSEMBLY 71-52-07-046-0 INTERNAL COMPONENT ID 52 PARENTS = 39(#5) 42(#6) END ADD !*** ERR: Feature with ID 52 already exists in the model. So I`ve got 2 different subassemblies in the main assembly(a 046 and a 048). The constraints are exactly thesame. Of course they already exist in the model, but I only want one of them to be active. Any suggestions ?
Hello there jelmer A coupple of suggestion to your pro/program prompt IF TOPEYE == "DESIGN1" BLA BLA BLA ENDIF Use the double = when you want a question for the program, this is the program is asking if the parameter has that value. And use the value between "" marks as is a string value y let the program know that is the exact value of the parameter. Now the second assembly needs also a condition that defines wether it'll show on or not, make it the opposite to the previous assembly, otherwise the program will assembly both at the same time Hope that works for you
Everyone, I`ve managed to get the model working the way I wanted. By adding the `IF` statements for the added parts. The parts not selected in the input window are suppressed in the assembly. The one thing I`m still wondering is how I put this down : IF Topeye == "1" or "2" or etc. add etc... Program doesn`t recognize the `or` statement, what is the right statement for this option ? My thanks are great.
If i remember good, or is write | (Alt Gr+6) As you can see below you can use multiple conditions and negative also here are below a few examples : if COURONNE_PRIMITIF:17==yes | COURONNE_PRIMITIF_SUP:17=yes COURONNE_PRIMITIF:34=yes else COURONNE_PRIMITIF:34=no endifIF DIAMETRE_PRIMITIF<>240 | DIAMETRE_PRIMITIF==360 & COURONNE_PRIMITIF==NO MAT_CAME=0 ENDIF IF DIAMETRE_PRIMITIF>=480 MAT_CAME=0 ENDIFIF COURONNE_PRIMITIF:17==YES PATIN=1 $D7:17=-6 $D8:17=-6 ELSE $D7:17=0 $D8:17=0 ENDIF Hope its helps !!
Bruno, thanks I`ve got it working with your statements : IF TOPEYE == "1" | TOPEYE == "2" | TOPEYE =="3" | TOPEYE =="4" | TOPEYE == "7" ADD SUBASSEMBLY SEAT_DESIGN1-4_7_8 INTERNAL COMPONENT ID 3554 PARENTS = 3551(#8) END ADD END IF
Ok I`ve changed the program lines a bit but now it gives errors for things I don`t understand. With : IF DESIGNCODE =="a" | DESIGNCODE =="b"| DESIGNCODE =="c" | DESIGNCODE =="v" It works fine With : IF DESIGNCODE =="a" | DESIGNCODE =="b"| DESIGNCODE =="c" | DESIGNCODE =="v" | designcode =="w" !*** ERR: line contains a bad symbol or is otherwise invalid It doesn`t. So with adding a fifth `designcode` it gives an error irrelevant to the letter a,b,c etc. Any explanation for this ?
!!? I know we cannot use a lot of letters or combinations as "c1" "c2" "g..." and others because Pro/e used them for some applications (there are reserved). So, maybe its the same reason for "w" but not sure. Do you tried an other letter ?