Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

changing assembly using Pro/Program

Monkeyboy62

New member
Hi all


I have searched through the forums of this site and others and have tried PTC learning video tuturials but this still confuses me, I know I know I must be a bit dim but please bare with me.


I have an assembly of various componants lets say for this senario I have block1 , block2 , block3 , and block 4 I want to run pro program to either include combinations of these blocks in the assembly or just simply eliminate/delete some and leave others. I created a family table with all the possible combinations as I thought this was the way to go and then I could create a program to ask which one I wanted..? I have read all the literature and I'm still stuck. would it be possible for any expert out there to explain in laymans terms the best way of doing this , or point me in the direction of a good tuturial that takes me step by step. As I said I have tried the video tuturials on the site for PTC for which I have an account but sometimes these go into great detail and for my samll brain it gets complicated... :-(


please help


many thanks


Monkeyboy
 
You could do this with family tables or not, it depends on what you want.


If you didnt use family tables you could assemble all 4 blocks independent of each other in your assembly. Create 4 parameters that are Yes/No.
Block1 Yes
Block2 Yes
Block3 Yes
Block4 Yes


Now in your program you have 4 sections: input,relations,add features/parts, mass props.


So for yours it would look something like


input
block1 Yes/No
"assemble block 1 (Y) or (N)?"
block2 Yes/No
"assemble block2 (Y) or (N)?"
block3 Yes/No
"assemble block3 (Y) or (N)?"
block4 Yes/No
"assemble block4 (Y) or (N)?"
end input

relations
end relations

if block1=="yes"
add part block1
internal component id 10
end add


if block2=="yes"
and so on.....


Let me know how that works for ya
 
Hi CSUSIE


Excellent , thanks for that. I will try that out ,does this work if blocks are not independent of each other?





cheers


Monkeyboy
 
if the if statement doesnt add the block then it suppresses it and the children will not know where to be placedin the assembly. That would be the reason for not assembling them to each other. ie if block2 is assembled to block1 and block1=N and block2=Y then you will have parent/child issues.


Also another thing to think about, I havent had too much luck using Yes/No variables so you may want to consider using a string with y and n's instead of Yes/No.


Are you going to use this assembly as a sub-assembly for another assembly? You could use family tables and do family table lookups for the instance you want in that top level assembly.
 
The assembly I am using actually consists of two mould sub assembly's each with two halves so a total of four componants. I sometimes have a situation where I need to either use all four componants or a combination of the four. The mould sub assemblies are related to each other in the way they are positioned in the assembly and then further to that the two halves are related to each other in the two separate sub assembly's. I just want to be able to open the main assembly and run Pro Program to ask which combination I require. Somebody has suggested I use a skeleton assembly to fix the positions of the mould sub assembly's so that when one or more of the coponents are not there it is not relying on a parent child relationship?


I think what I am trying to achieve is possible but creating the correct program and assembly may take me some time to understand. It seemed simple at first , maybe it is and its just me thats simple ..
smiley5.gif



anyway thanks for the info and if you can offer anymore advice that would be great





Monkeyboy
 
MonkeyBoy


First of all .... nice handle
smiley17.gif



I have used the same method as Csusie in the past. The only drawback I found was the constant inputs required each time you regenerate.


There is another method which takes advantage of the family table that you created.


Let's say that the Generic model is Block.prt and the instances of the Generic are Block1, Block2, Block3 and Block4. You would have to assemble the Generic as many times as you neeed (don't select an instance yet). For each position you assemble the Generic, you would need a parameter that would control this position. I'm starting to ramble .... so let's get on with it.


Create a string parameter and give it a value of Block1.
LocationA = Block1


In the program part of the assembly, find where the Generic block was assembled...may be something like

add part block
internal component id 10
end add


Change it to ......

add part (LocationA)
internal component id 10
end add


When you exit from the progam and regenerate .... the generic will be changed to Block1. To further test ..... change the parameter LocationA to another valid name from the family table ......


Let me know how this works for you.
 

Sponsor

Back
Top