Creo Parametric - Pro/PROGRAM Part 2 - Assemblies and Execute

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in creo parametric you can use Pro program to turn your models regeneration into an interactive process so that you can be prompted for the values of different dimensions and parameters in a previous video I use Pro program at the part level in this video I'm going to use Pro program at the Assembly level and I'll show you how you can use the execute construct in order to pass different values from your assemblies down into your individual components let me orient you to this assembly for a moment in this assembly I have a plate part and that plate part has a hole in it it also has a number of holes for bolts then I have a reducer sub assembly and the reducer sub assembly has the actual reducer component and a pipe and a bunch of bolts that fasten the pipe to the reducer and we also have a bunch of bolts and nuts at the top level of the assembly in this scenario I want to control four different dimensions at the top level I want to control the diameter of the hole at the inlet side and the diameter on the pipe side I also want to control the number of bolts at the plate side and also at the pipe side additionally in the sub assembly I'm going to control the height of the reducer so those are five different dimensions that I'm going to control for at the top level and one in the sub assembly so let's take a look at how to do that first off I am going to access program by going to the model intent overflow and then choosing program and here in the menu manager I'm just going to jump right to editing the design and here we have the first section this is the header section then we have our inputs relations then we have our model body and then down at the bottom we have the fifth section for the mess properties let's go back up to the top and here I'm going to write in my four inputs at the top level let me put in some spaces in here and the first input is going to be let's do the plate side diameter let's see now I'll call that the plate hole diameter and that's going to be a number and then in quotation marks I'm gonna put the prompt enter the diameter on the inlet side and then let's put in the number of bolts on the plate side plate bolt holes and that's also going to be a number right the prompt and then the third one is going to be the diameter the hole on the pipe side and that's also going to be of the type number and lastly let's put in the number of bolt holes on the pipe side and that's gonna be it for the front so I have four different prompts that were writing here at the top level now let's scroll down to the body section in the body section first we have internal feature ID 1 this is actually the first datum plane ASM right and then scroll down here we have internal feature ID - this is actually my second datum plane this is a SM top then feature number 3 is a SM front and feature number 4 that is the default coordinate system then we have our ad construct for the components first we have ad part and the part name is plate program you can see that here in the model tree and it just has the line for the internal component ID and then the end ad here we have the ad sub assembly reducer program a/c that's the same name over here and the information for that in order to pass information down to the component we're going to use a construct that's called execute that ends with end execute and that's going to pass those different inputs down to the components but before I can do that I need to prepare the model to receive those different inputs so let's go ahead and do that let's hit the save out of here and I'm gonna exit out of notepad do I want to incorporate the changes into the model yes I do now it asks me what I want to do about the inputs I'm going to enter in the inputs because these all right now have a value of zero seeing as I just created them so let's plug in some initial values so the diameter on the inlet side I'm gonna start off with a value of 40 number of bolts on the inlet side let's choose eight and diameter on the outlet I'll choose 20 and also eight bolts over there and I plugged in the different values nothing changed because none of the models know how to use those different values now let's go over to the plate part so we can figure out what those values should be so here I go into the plate part first I've got the hole over here let me click on it with the left mouse button and then from the mini toolbar I can use the Edit dimensions command and I can see that right now it does have a value of 20 I think I interested in a value of 40 but more importantly I need to figure out what is the name of that dimension I'll go to the tools tab and then switch dimensions and that is the d7 dimension the other thing that I want to control in this part is the number of bolt holes so let me select that and I can see that there are two different dimensions here P 36 and P 13 let me switch dimensions and okay six holes in the first direction and one set of holes in the second direction this is the one that I'm actually interest interested in let me switch dimensions so that one is P 13 so I want to control those two different things also if this diameter changes the or the bolt-hole circle should change as well let me take a look and see what that dimension is let me select the first hole in the pattern and then edit and that looks like it is the d-10 dimension is the one for the bolt circle diameter all right so in order to have this be driven by the next higher level let's go to the program I will go to the model and ten overflow and then choose program and edit design and then in here we have the inputs here we're going to put the names of the dimensions D seven and P 13 since I'm going to assign those to different values so let me put in here and in this case here we're not going to specify what type it is or write a prompt I'm just gonna put in the names of the dimensions D seven and P 13 and then let's have the difference that's all I need to do in here but I do want to add in that relation so that the bolt circle does adjust when D seven changes so that dimension was D 10 for the bolt circle diameter but I'm gonna put in a couple spaces just make it easy read D 10 is going to be equal to D 7 I'm gonna add a value of 6 for the bolt circle diameter so that is good let's choose file save and then file exit do I want to incorporate the changes yes and I'm just gonna see if I can get out of this with current values so now that I've updated the part model now let's go back up to the assembly in order to pass the entered values at this level down to the plate so once again I will go to the model t' and overflow and choose program edit design here we have our different inputs let's scroll down over here again past the default datums and this is where I want to put in that execute information so we'll start with execute part and then it's going to be the name of the component plate - program and then we're going to put in the different dimensions those inputs that are going to get the values of the parameters that were entered here so d7 that is going to be equal to the plate hole diameter and then that p13 dimension that's going to be equal to the plate bolt holes and then we'll type in and execute and just to be sure just want to check the name to your plate hole diameter plate bolt holes just make sure they match up plate hole diameter plate bolt holes that is good over here so now let's let me scroll down just to show you one smart so again execute type of component the name of the component the relations that are going to pass the values from the assembly level down to the individual component and then and execute all right let's hit file save and file exit do I want to incorporate the changes yes I do and now let's enter in the values let's select all again and then done select and so enter the diameter on the inlet side let me just do something slightly different to the model we'll update 36 number of bolts let's do something weird like 5 enter the diameter on the outlet side how about 24 and number the bolts on the outlet side we'll do seven and I hit that and you can see okay so the diameter updated the number of holes updated inside of here but right now it doesn't match up with the sub-assembly so let me just hit done return out of here for a moment and now what I'm going to do is hop over to the sub assembly and prepare it to enter the values and also have a prompt for the height dimension so let's go over to the reducer sub assembly I will choose the open icon from the mini toolbar and now over here let's go to the model intent overflow and then choose program and then edit design and so here we have our input section and so what I'm going to do is I'll just type in the names of the inputs that are going to come over from the higher-level assembly now I'm going to use the same name that will make things easier on me let me choose plate and let's see hole diameter and plate bolt holes and then pipe hole diameter and essentially what I'm doing here is it's essentially it's initializing the different variables in here and I said that I wanted to have the height entered in at this level so let's create a variable called height of the type number and type in the prompt enter the height of the reducer so that is good for that let me click save and exit do I want to incorporate the changes yes I do and let's and turn the values here we have all of them listed because it thinks that these different variables only exist at this level that's fine let's just select all and then done select and and turn some different values here hay for the plate hole diameter let's use a value of 20 number of bolt holes let's use eight pipe hole diameter let's use a value of ten and the number of pipe bolt holes let's use the value of eight and the height of the reducer let's use a value of I don't know 60 and I entered most different values and then hit done return and nothing happens in here because again all we did was we inputted a bunch of different values we haven't assigned them to anything or pass them down from the next higher level let me hop over to the reducer real quick and just want to mention something that'll help you out later on okay with the plate I looked up the names of the different dimensions and I saw that we had a d7 dimension for the diameter to the hole we had a P 13 dimension for the number of the instances one way that you can make things easier on you is by changing the names of the dimensions from whatever creo parametric assigns to them to the actual name of the variable that you're using and that saves you from having to write the relation so I'm gonna go to I happen to know in this particular model the datum plane controls the height of the reducer right now it has a value of 20 let me go to tools and then switch dimensions right now that is the d3 dimension if I click on it it brings up the tab for the dimensions properties and over in here I'm gonna change it from that default I'm gonna change it to the name height and so there you see a change on the screen that is good and that's just gonna save me a step in a couple minutes but let's go back up to lead let's see at this point I want to go to back to the actual upper level assembly over here and I want to use that execute statement in order to pass the four different variables at this level down to the sub assembly so let's go to down over here alright so here's the d7 teen c7 and the p13 that I did and here's the ad and end ad and in here this is where I'm going to put in the execute for the sub assembly so let's type in execute and you don't type in sub assembly like you have here this is actually the type assembly and the name is reducer program a/c and the different ones I'm gonna pass to it plate hole diameter plate bolt holes and pipe hole diameter and pipe bolt hole so I'm gonna pass all four down to the sub assembly and then let's type in our and execute and again I want to just double check every time that you do this to avoid errors just to make sure that the names match up with what you are passing otherwise you will get an error so that is good let's choose file save and then exit out of here up it says I've got an error let's try to edit and see what I did wrong so now we will scroll down over here and most likely case is typing oh here's what happened I just wrote the names of the variables I need to actually write that this on the component side is going to be equal to the same name so again it's passing what's on the right at the higher level down to the lower level yes so it does have a syntax checker which will flag you to different mistakes that you make let me save and exit and when you get this prompt do you want to incorporate your changes into the model pretty good sign that your you entered in everything correctly so let's enter in some new values here select all doesn't select and let's see Donny and wood are on the inlet side let's use a value of thirty number the bolts here let's change that to eight diameter on the outlet side let's try 20 and the number of bolts on that side let's choose six and now we get this other one where it's like it's prompting us again because I added another prompt at the sub-assembly so it wants to know what I want to do down at the sub-assembly level so let's choose enter and here is that variable height I'm going to enter in a value for it right now it has a value of 60 let's change that to a value of 40 and again you'll notice that not much update except for what was going on in the plate because we're not yet driving the sub-assembly by the different values oh yeah you'll also notice we got a regeneration failure that should resolve itself in time but let's go back to the sub assembly to start driving different values in here so let me open up the sub assembly in its own separate window let's now go to the program command and I will edit the design and so again we're passing down four different dimensions or variables from the top level we're entering in another different one there are no relations that I want to write at this level but let's scroll down we've got our default datums up here at the top here's this one says yeah this is the default coordinate system okay so now we're back to down to where we're gonna pass values to the reducer so let's right execute and let's see part and the name of the part is reducer - program and I think the only thing I changed so far was the height so that's the only one I'm gonna pass on in the past height equals height I'm gonna try spell it correctly and then and execute so right now this is just going to pass that height dimension to the or the height variable here at the sub-assembly level down to the park and since I changed the name of the dimension that control that datum plane to height then I don't have to write a relation down at that level so let's see if I did everything correctly so far save and then exit yes I want to incorporate the changes let's try using current values and now let me go back to the reducer and fix that to make sure that it is being driven correctly so on the tools tab you'll also have a model intent overflow that you can use to get to program let's edit the design and so here I need to put in the different inputs and this is actually gonna have five different inputs all the ones that we created earlier including that height one but we have the plate whole diameter we have the plate bolt holes and we have the pipe hole diameter and the pipe bolt holes now earlier I figured out which different dimensions need to be driven by this so let's go ahead and write in those different relations so for example I know that the number of holes in the plate that's actually be ap11 dimension and that's going to be equal to plate bolt holes and the corresponding dimension on the pipe side is p36 and that's going to be equal to pipe bolt holes I also figured out which dimensions in this particular part correspond to the plate hole diameter and the pipe hole diameter so let's assign those I know that the D 45 dimension the model that should be pipe hole diameter the way I figured out that out was the same way that I did it on the pipe side I just selected the different features and model went to edit dimensions and oops got that wrong let's see D 45 this should be plate side this should be pipe side yeah I just want to edit dimensions and figured out what those different dimensions were all right also in here I need to write some relations that will control the bolt circle diameter as well as the outer diameter of the plate if I want to I will put in a comment line forward slash asterisk control outer diameters of flanges and bolt circle diameters and let's see the D 1 dimension that is going to be equal to D 45 plus 10 and also the d 8 dimension that's going to be equal to d 47 plus 10 in other words make the diameter of the flanges just bigger than the diameters of the holes and also along with that I'm going to have the D 5 dimension that's the one that controls the bolt circle diameter that's going to be equal to D 45 plus 6 and the other one is d31 that's going to be equal to d 47 plus 6 so again both circle diameters and again on doing it I'm taking these inputs from the higher level and then having them drive the different part level dimensions let's see if I typed everything correctly in here let's choose save and then exit yes I want to incorporate and just to test this all out let's enter in the values here at this level so I will choose all the different dimensions and for the height let's try value 40 for the plate hole diameter let's try value of 40 there for the number of bolt holes let's use a value of 10 the pipe hole diameter at the top let's use 15 and the number of bolts at the top let's use 3 and so there you can see wow this looks really really weird I think I got one of the relations wrong because this top flange shouldn't be that big so let's take a look at edit design and let's see over here ok so I did get a couple of the different dimensions wrong this one - switch my D 5 my D 8 this should be D 5 and this should be D 8 let's try that file save and exit yes I want to incorporate the changes let's use the current values there we go that looks much better in here so we have it looking like a reducer and not looking reducer but it does look like a reducer so that way we have things being controlled at this level properly let's hit done return it out of here let's close this and hit the regenerate button let's use the current values actually it's entering the values in here select all and there we go so again we have the reducer updating right now the pipe isn't being driven by the different values in here so we have to make sure that the pipe also works as well so you can see that we're actually this is a bit of forking that I'm doing here to drive everything at the top level so here we have the pipe this is actually a family table instance so rather than using open from the mini toolbar I'm going to hold down the right mouse button to get the pop up menu to use open generic and again I'm going to open the generic from the select instance dialog box in another video I will show you how you can use pro program to select different instances of the family table but again there's a lot of information in this video so I'm not going to be able to show that in this particular one so let's now set this up for pro program so let's go to the model 10 overflow and then choose program and edit design and for the inputs on here we're going to enter in what we want to get from the higher level and that's going to be the pipe hole diameter and pipe bolt holes so those will be input there are already some relations here in this model that control some other different dimensions in here let's drive the dimensions of the flange put in a comment line and again from just checking out the model earlier I have to know that the d-22 dimension should be equal to the pipe hole diameter and the p6 dimension that's the number of instances in the pattern that's gonna be able to pipe bolt holes and now let's hit the Save button and then exit yes I want to incorporate the changes let's test this out so I'll choose enter select all and unselect and the new value for the pipe hole diet whoops accidentally hit the middle mouse button this is probably gonna fail let me generate let's enter in the different values all right so the value for the pipe hole diameter I want that to be a value let's try 25 and the value for the pipe boltholes let's try again just wanted to have something different let's try 10 and then oh we're getting a failure because I don't have the other different dimensions for the base extrude or the bolt circle updating properly so let's go to the relations dialog box and so I have the flange dimensions over here let me control some of the other different dimensions in here forgot to do that and I haven't know that the d1 dimension is the flange diameter and so that's going to be equal to D 22 which I sign into the pipe hole diameter plus 10 and the bolt circle diameter is d 2 let's make that equal to D 22 plus 6 in this case here I'm writing the relations right here in the relations dialog box I could have also gone over to pro program to do that so let me verify the dimensions and click the ok' button and let's regenerate let's enter in the different values and i have 25 and 10 there we go big diameter 10 holes in there so always need to test your work as you're doing it so now the pipe is working let's close out of there you hit the regenerate button here and let's enter in the different values for everything and let's see for the plate hole diameter right now is a value of 30 yeah let's leave that we have eight holes down on the plate let's see 20 for the pipe hole diameter and six holes up there and then for the height 40 so now oh it's asking me for a reducer program let's see let's because it's at the lower level as well alright so something tells me that I probably don't have what's going on at the reducer level being assigned it's different values so let me go back to the program let's edit the design something is probably missing and execute so let's scroll down over here pass the default datums okay so so far I've only passed the height down to the reducer let's pass on the other different dimensions in here as well and so let's pass on let's see we have the pipe hole diameter that's going to be equal to pipe hole diameter let's see pipe bolt holes it's going to be equal to pipe bolt holes let's see we have the plate hole diameter that's going to be equal to plate hole diameter and plate bolt holes we want that to be equal to plate bolt holes and I'm probably not passing values down to this as well so let's add in our execute construct here so we're going to execute part straight and let's see we want to pass to that pipe hole diameter and that's going to be equal to pipe hole diameter and because I screwed that up I was getting into an endless loop infinite loop of hey what are the values that you want for stuff all right so now this should be passing values into the individual components let's save let's exit yes I want to incorporate the changes but and turn all the different values and again 30 that's good eight holes 20 up at the top six holes and then height of 40 there we go and now you'll see that they're updating together with each other so everything is good down down at this level let's now go up to the top level and we're getting a regeneration failure let's hit the regenerate button let's enter in a bunch of different values I will select all of them you'll notice at the top level we only have four different ones because the height is being controlled in a sub assembly so let's hit done select out of there and let's see diameter on the inlet side let's do a value of 40 I would like to choose different values every time just to make sure that stuff is updating let's do 10 down at the bottom let's see diameter on the outlet yeah we can leave a value of 20 there Alice do 15 and the number of bolts there let's use a value five and now again we're being prompted in this case here for the dimension in reducer program let's enter in a value for the height I'm going to enter in a value of 20 and there you see how everything updates got a problem with one the nuts in there that's weird you okay just FYI the nut failure had nothing to do with the pro program stuff turns out the nuts had some really weird constraints in here they didn't do it this simple way of just coincident constraints hey fixed it to hit the easy button and now the nuts are not having a problem let's try regenerating and entering in different values again select all and then done select and let's change the inlet side diameter from 40 down to 30 let's change the number of bolts down to 6 the diameter on the outlet side let's use a value of 20 let's make it 24 and the number of bolts on the outlet side let's use a value of 6 there as well and and turn a different value for the height let's use a value of 30 this time and there we have a different reducer and just like in the previous video if you go to the model and 10 overflow command and then program there's the instantiate option in order to create a family table instance in here but again that is how you can use pro program at the Assembly level with the execute construct in order to input values at the different levels and then pass them down to lower levels individual components or sub assemblies within your model I hope you enjoyed this video for more information please visit WWE windchill com if you learn something from this video please give it a thumbs up and if you like this video please click the subscribe button to be informed when new videos are uploaded thank you very much
Info
Channel: Creo Parametric
Views: 3,970
Rating: undefined out of 5
Keywords: creo parametric, ptc creo, creo ptc, creo parametric tutorial, creo parametric 2.0, creo parametric 2.0 tutorial, creo parametric 3.0, creo parametric 3.0 tutorial, creo parametric 4.0, creo parametric 4.0 tutorial, creo parametric 5.0, creo parametric 5.0 tutorial, creo parametric 6.0, creo parametric 6.0 tutorial, program in creo, creo parametric program, creo parametric pro program, pro program in creo, creo parametric assembly
Id: F8NG9IRnmxw
Channel Id: undefined
Length: 37min 53sec (2273 seconds)
Published: Mon Mar 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.