Automated Assembly Generation with iLogic | Autodesk Virtual Academy

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so as you can see there on the screen what we're going to be going over is some automated assembly generation with ilogic um it helps the cameras part of this session because cameron works directly on our automation team here at kativ um i'm sure he'll talk a little bit about that but essentially a lot of our customer projects that they have us automate you know things like this or in this nature or even way more complex than this cameron usually ends up working on some of those projects for those customers so definitely glad to have you as a resource today i know you're gonna go a little bit into more detail as to what all of this means and how to start um utilizing some of the power that inventor has um within it i know last week we did some vba or some some visual studio and we looked at some of the automation on that side today we're going to be looking at it from the ilogic side within inventor itself um so there are a couple of ways to do it uh like we always mentioned if you do have any questions at any time go ahead and chat those in and our team will go ahead and answer those in the background and if you have any further discussion that you want to have about automation for your company entirely uh let us know and we can help you point uh into the right direction because there's nine ways to skin a cat and uh inventor there's a lot of cats i guess so with that i'll go ahead and pass it over to cameron and uh go ahead and take it away all right thanks nigel yeah so like nigel said there's a lot of ways to automate inventor and there are a lot of ways to automate assembly creation in inventor um one of the ways that people commonly do that um is with ilogic but there are other ways like through the visual studio interface creating add-ins like we've done with some of our ava's in the past and like nigel said i'm on the automation team so i do a lot of this stuff day in and day out and today i want to talk about uh kind of a unique one a unique approach to assembly generation that uh you don't see a lot but i think there's a lot of power in it and especially in most recent versions of inventor it's got a lot better so let's let's jump into that so like i said a common a common use of eye logic let me go ahead and all right so like i said a common use of ilogic is to configure assemblies and this is usually done by turning on and off the components that are in the assembly or by component replacement but today we're going to talk about uh we're going to look at a different way using ilogic to generate new assemblies by placing and constraining components on the fly this is useful for creating assemblies from part or assembly templates and the end result is an assembly with only what you need in it there are no extra unneeded components that are turned off but are still in the assembly so we're gonna we are going to focus on the major i logic functions that are useful for this approach namely adding components and content center parts creating the most common types of assembly constraints and creating component patterns and like i said recent versions of inventor have introduced new ilogic functions that make these tasks much simpler than they used to be the old way didn't have many ilogic shortcut functions available so you really needed to have a certain level of knowledge of inventor's api to really get anywhere but these new ilogic functions simplify the code a lot so take a look at these two blocks of code here it's a little small on the screen but you know we're not really going to get into the details of what was shown here i just kind of want to put this up as an illustration of the top block of code is the old way of placing a component in an assembly and the bottom block of code is the new way of doing it so just at a quick glance you can see it's much simpler code to write quite a few less lines of code involved in one than the other now you don't necessarily need all the lines of code here to just place a component some of this is you know like naming the occurrence once it's placed making sure that it's visible that usually comes in true automatically and then setting the part color is not necessarily necessary for just placing the component but i put it in here as an example of all of this code that you see on this block is basically what this one line of code down here is doing it's set it's setting the color it's setting the visibility setting whether it's grounded and all that stuff it's doing all that in one line of code where the old way of doing it was about this many lines of code up here in the top block but the more the most important part of it it's not so much the number of lines of code but the more important part of this is that the original code here the old way of doing it is there weren't really any uh short ilogic shortcut functions involved in doing this you had to get down into the inventory api and understand those methods and properties of the inventor object model in order to be able to write this but now with the new ilogic functions it's really simple you just pull this out of the snippets put in you know change the parts that you need to to make it specific to what you're trying to do and then it's it's so much easier to do so um to place so this is for placing just a component in your assembly placing a content center part was at least this amount of code plus more for accessing the content center itself that is also much simpler and just a single line of code i'll show you an example of that today and a similar idea for creating assembly constraints now can be accomplished with a single line um so yeah let's just jump right into it so i'm gonna close out all this stuff here let's go over to inventor and i've got an example assembly that we're working with today it's just a little air engine that i designed and built in one of my university manufacturing classes and we're not going to build the whole thing that'll just take too long but we're going to focus on placing a few of these components writing the eye logic is to have inventor place the components for us and to constrain them in place and so we're going to be placing this chassis the axle there's some bushings the bushing on the flywheel and the bushing there and then there's some bushings at each part where the axle goes through the chassis and then we're also going to to see an example of placing components from the content center we're going to place these bolts and i'll show you an example of how to create a pattern a component pattern with eye logic code so we'll we'll use this assembly as an example we'll kind of come back and forth refer to it but i'm going to go ahead and open up open up i've got an empty assembly that i've started here right now there's nothing in it there's no code but we're going to go ahead and start writing our rule so we'll go to our logic tab right click add rule we'll call this build and all right so the first thing i want to do is we are going to be placing parts from a specific folder on my hard drive that contains all of these engine components here so i'm going to just make a common reference to this folder so i'm going to go ahead and copy that folder location and i'm going to make a variable here to hold that information so just paste that in so there's our parts folder we're going to be using that quite a bit so i'm just going to create a common variable for it all right so the first thing we're going to do is we're going to place the chassis and we're going to go over here to our snippets and we're going to find ilogic assembly slash components so this is this is a new category it wasn't always there it was introduced 2019 i think was the version that was introduced yeah i think you're correct cameron if i remember correctly i think i wrote the blog for that so i think it was 2019. okay perfect thanks nigel all right so we're looking for we're looking for our basic ad component so i'm gonna go ahead and double click that and first thing i'm gonna do is just rename this here so it's not quite as generic call that chassis comp and then okay so let's take a quick look at what's going on here some of these you can kind of tell what they're getting after this is obviously a file name this is going to be the component name in the browser once it gets placed and then but if you're not sure what any of this stuff means it's always a good idea to hover over that function right there and you'll see it pops up and at least gives you an idea of what that so the first one is going to be occ name as string okay so that's like i said that's going to be our current name once it's placed the file is the next argument then after that is going to be our position if we want to place that any specific be placed in a specific spot we can give it a matrix or a point so it knows where to place it you can also set where that's grounded whether it's visible and you can give it an appearance asset name if we want to set it to a certain color or something okay if you're ever if you ever need more info or if sometimes these are not quite as clear exactly what they're talking about and so it's actually good to go and i'm just going to hit this help button right here and that's going to pull up my browser and go to the inventor help and it automatically goes to this ilogic help section which has got um if we go to the functions for rules in ilogic there's some good documentation on the the functions for ilogic unfortunately it doesn't look like they've updated this section to include the new stuff so there's no ilogic components section here but i did find that it is down here if you scroll a little further down and go to ilogic api expand that and then we're going to be looking under ilogic i'll expand that as well and if we go down to i me i managed group of of interfaces then we'll be able to find the things we're looking for so specifically the ones that we're going to go over today placing components placing constraints and creating patterns you're going to find those under the eye managed assembly interface the image components interface constraints interface and then down here will be image patterns right there so the functions will be in there so if we look under i manage components interface just click on that and if we look down here at the methods we'll see there oh that's content center part here's just the ad routine right here so if we click on that it'll give us some more information so here's the basically the information we saw in the pop-up inside of the ilogic editor and then down here gives us a little more description of what that stuff is going to be okay so this is a great resource for trying to understand what these functions do and what they expect the values they expect you to give them in order for them to work properly so all right so the first thing we're doing here like i said that's the name of the component once it gets placed and we can name that whatever we want i'm going to call it chassis i like to use this this is my own personal convention i put an underscore in front of the component names to let me know these are components that i've manually set the name for rather than just so i can distinguish them from the ones that and vendor has automatically named um all right now here's our file name so we've got our we want to refer to our parts folder so i'm going to go ahead and paste that in there and then concatenate on the file name which i'll go and grab from the folder here as well so there's our engine chassis just hover over that copy it go back to our rule paste it there and i do want to make sure i put that slash in front because it's just basically tacking it onto the front of this or the end of this parts folder here so i'm going to need that extra slash to get the full file name all right so the position now uh the first component that it places in if you give it a position nothing it's going to drop it in essentially zero zero zero the origin which is exactly what i want for the chassis um and i'm just gonna because the chassis is the first component i'm just gonna ground that so let's go ahead and set grounded to true visible true is fine i'm not concerned about the appearance right now so let's do that i'm going to bring that down make that a little more readable okay so the position nothing is fine for the additional components that we're going to place later we're also just not going to worry about the position because we're going to be creating constraints in order to make sure those end up in the right spot so i don't really care where inventor drops the component to start with because our constraints will handle placing the components where we want them all right uh let's just go ahead and preview that make sure it's working so let's save close we'll go ahead and save our assembly and then i'll run the build rule there we go it's dropped in our engine chassis it's giving us the name that we chosen underscore chassis and in this case here we haven't built any constraints on there we've just grounded it in place at the origin so if we highlight our origin here we'll see ground plane is here or the xz plane and then there's a plane that goes through the axle and then one that runs right down the middle here so okay so that's exactly what we want that's good let's go ahead and continue building our rule we are going to next thing we're going to do is place the axle and i'm just going to copy and paste this here and i'll just rename this to axle comp and change our browser name and then we need to get our new folder or our new file name grab that copy that paste that there engine axle okay the position nothing is fine like i said we're going to constrain that this one i don't want to ground though because we are going to constrain it so we'll change that to false and then that's good we don't need anything else there all right so that's not what i wanted to do okay so we've got it placing let's go ahead and do the constraining while we're at it so so now we're going to create a constraint so we're going to go down here to relationships add so this is the new group of functions again that was added in 2019 these are the original ones we had to work with where basically the constraint had to already exist and then we could control whether it was active or not but now we can actually just create them on the fly all right so we are going to uh with the axle let me save this and open up the axle part so you can see what we're working with i mean it's a very very simple part just a simple cylinder but what i'm looking at here is where the origin is at so we've got one the yz plane is right down the middle and then these two planes here are right down the axis of the cylinder so basically what i want to do is just drop this part in to our assembly and two of the origin planes are just going to match right up and the third one is just going to be offset from the ground by whatever the distance is here one inch okay so the simplest way for me to do that is to use go back to our assembly here go into our ilogic rule the simplest thing for me to do here is to use this snippet or called add ucs to ucs so ucs is a user coordinate system so if you've got user coordinate system set up in your parts then you can just tell inventor okay this is my name user coordinate system in one place and named user coordinate system in the other place match them together and it basically creates three flush constraints between those coordinate or planes but it's also we don't have ucs's here in these parts but it's but it's also useful to just constrain origins together so let's take a quick look at what we've got here if we hover over that we'll see that the first item is a constraint name as string so that's the name of the constraint that's going to get created we can choose whatever we want for that and then the next item is going to be the component the first component we're trying to constrain and that's going to be that its browser name and then the item after that is either the name of the ucs we're trying to connect or in our case we're going to change that to origin and then the second component and then it's ucs or we'll change that to origin and then the offsets between each directions so let's go and name this we'll just call this axle to chassis and then um the first component we're going to constrain to is going to be our chassis so i'm grabbing that component name up there the browser name pasting it there the second component we're going to do is the axle so i'm going to paste that there and then here since we're not using ucss we just want to use the origin what we do is we just replace this with origin and then we do the same thing here and the way i know that is from the help documentation if you go to constraints interface add ucs to ucs and you come down here the name of the ucs in the first component use origin to refer to the origin instead of ucs okay so that's how i knew how to do that and then these are gonna be our offsets uh for our x and z offsets those are just fine at zero the only one we needed to change was this y offset needed to be one okay so let's go ahead and save that now if i run this again it's going to try and place another one in here which i mean normally would be fine but it's going to try and place another one with the same name which inventor won't allow so just to kind of keep this running before each time i run out i'm just going to clear this out so we've got a clean slate to work with then let's go ahead and run our rule okay so there's our here's our chassis and our axle and you'll see that one line of eyelogic code the ucsd ucs constraint creation actually created three flush constraints between the origin planes and this one had an offset of one okay all right so i'll go and delete those so it's fresh for our next run let's go back into our rule and the next component we're going to do is uh the left bushing so that's going to be the bushing at the you see it kind of in there and where the axle goes through the chassis there's a bushing there go ahead and open that up so you can see it's just a simple hollow cylinder we're going to place that so now with that one what i would do if i was just manually building this assembly is i would constrain i would use an insert constraint on this edge of the of the chassis open that up this edge right there and this edge of the bushing so i'm just going to do that same thing i'm just going to tell my ilogic code to do that now the trick is how do we how does ilogic know how to find these edges and in order to help eyelogic find those we're going to take advantage of again some new functionality they've added in recent versions of inventor by assigning a name to this edge so i'm going to right click on that assign name and i'm going to call this left bushing edge okay so now if we just call that out by name in uh in ilogic inventor knows exactly where to find that i'm going to go ahead and do the same thing for the other side here right pushing edge so now we've got those two i like to turn the labels off just to clean clean things up that's totally up to you all right let's go ahead and save that and then we need to do the same thing on the actual bushing itself so i want that edge there assign name and just call this pushing edge that works hide the label save it okay now let's go back to our ilogic rule and we are going to place left bushing and we're going to use the same bit of code here so i'll just copy and paste we'll call this left bush income and give it a name the actual browser name uh left bushing and then we need our file names let's grab that this is going to be our chassis bushing as opposed to the flywheel bushing which we'll place later so copy and paste engine chassis bushing.i ipt position nothing's fine not grounded everything else there's good all right now let's constrain this guy and like i said we're going to do just like we would if i was building this manually by placing an insert constraint so we go down to our relationships and we want add insert it's an insert type constraint okay and this is going to be our constraint name once it's placed and we can call this uh left bush insert and then this is the first name of the component we're trying to constrain to which will be our chassis so i'm going to grab that component name place it there you could create variables for these um just so if you ever needed to change those there would be one place to do that if i was you know if i was doing this for real i would definitely do that make it easier on myself if i ever had to change but just for our purposes here today i'm not going to worry about it okay so this second item here is going to be the the entity that we're trying to constrain to so basically what you would pick if you were creating this constraint manually and there's um basically uh we're just going to put in the name of the that we assigned to that edge so we called it left bushing edge and it knows it's going to look in that part for that named entity and then part we're trying to constraint is the left bushing so we place that constraint component name there and we call this bushing edge inside that component and then we have the option of choosing whether the axes are opposed or aligned we do want these to be aligned so opposed is equal to false so that's good we don't need any offset so that's fine there we could lock the rotation or not let's go ahead and do this in real life that's a press fit so it would be locked in rotation and then these bias points are a little more advanced these are going to be like sometimes if you are creating constraints um the entities that you pick and choosing the alignment isn't neces doesn't necessarily remove all degrees of freedom the constraint could have multiple solutions it could solve either one way or maybe flipped around the other way or something like that and so the way that uh you know if you're creating constraints manually you could just maybe like grab the part rotate it and have hit the update button have inventor resolve that constraint and it will solve to this to the solution you want we don't really have that option with ilogic so they've given us these bias points that we can use basically some points that you can give one point on the one component and then another point on the other component and inventor tries to get those two tries to solve the constraint in such a way that those two points come together as close as it can so that's what those are for is for helping with those situations where the constraint might solve in a way that you don't want it to and you need to solve the other way so but in this case we're all we what we're doing today is just for fairly simple constraints that solve the way we need them to so we can leave those bias points in nothing all right let's go ahead and save and test that there we go so there is our left bushing placed nicely let's go ahead and take a look at the constraint that it made there we go left insert so if we look at that we'll see that the rotation has been locked so that boolean lets us choose that basically essentially that check mark state so all right so far so good let's delete that and save our assembly go back in now we're going to do the same thing for the right bushing it's going to be very similar so i'm just going to copy this bit of code and paste it again and just go here and change some stuff so we'll call this right bushing comp component name will just be right bushing it's the same file all that looks good constraints just rename those and then we're going to go inside the chassis part we also created that we named that other edge right bushing edge and this is going to be right pushing pushing edge there we go so that should be good for getting both of those there we go there's our red bushing okay all right next thing we're going to do here is we're going to place the flywheel and the placement of these components is all pretty straightforward but on each one of them trying to show you different ways of constraining using some of these different constraint options here and and then once we get down to the center component you'll see the placements different in there so this is going to be our flywheel component let's go grab the file name flywheel okay so that placement looks good now we'll constrain the flywheel so the flywheel i want to be able to spin so i don't want to remove all degrees of freedom i could just have it the the the origin of the flywheel is basically in the same spot as the axle origin so i could just use a ucs to ucs constraint and just match up those origins and it'll create three flush constraints between them but um in this case i want the file wheel to be able to spin so i don't want to create those constraints and so instead what i want to do is i'm going to create i didn't rename this so let's do flywheel comp there we go so instead let's open up the flywheel take a look at its origin so i've got the yz plane is going right down the middle here and then the other two go through the axis so what i want to do is i'm going to take this yz plane and i'm going to match it up with the yz plane on the axle so that'll remove quite a few degrees of freedom and then the last constraint i'll make and i'll use a flush constraint for that and then the last constraint i want to make is a mate constraint between the x-axis of the flywheel and the x-axis of the axle and then that will remove all degrees of freedom except for the one rotational degree of freedom so let's go ahead and do that so the first one we want to do is a flush between the two planes so i'm going to come down here and go add flush and we can call this flywheel to axle yz and let's see the component we're concerning to use our axles we'll grab that component name paste it there and here like you can see you can give it the name of like a a work feature like a plane or an axis or something and or you could do the origin so in this case we want the yz plane so i'll just replace that and then this is going to be the next component is our flywheel so i'll grab that name paste it and then we're going to do the yz plane on the flywheel and then offset a 0 and then we don't need our bias points okay so that'll create the one constraint the last constraint we need for that is the uh constraint between the two axes we can't use a flush for that we have to use a mate so let's go ahead and grab and add mate and we'll call this flywheel to axle x and this will be axle again and instead of a plane we're going to just do x axis so these are the names of the work features if you're not sure exactly what those are you can just you know every part has the same origin so you can just come up here and take a quick look at that you'll see what the names of those are so they've got to match those names so we've got x-axis you can even just select on one and come over here and get the name straight from it so let's do that here for our flywheel and then we'll highlight that and then double click our x-axis and it'll write it in there for us okay so the mate's got a few extra options um we don't need an offset for this there's these inference types we don't really need to worry about those it's going to infer exactly what we want basically the options that you see here are going to be the options that you have when you're manually creating a constraint all the different things you have to pick and choose from are translated into these different options you can put into the ilogic snippet so again if you're not sure exactly what those are you can look at the documentation or you could even just go open up the actual manually place a constraint and see what options there are and you can probably figure out what they're asking for so okay that's good let's try that let's go ahead and save our assembly run rule there we go so there's our flywheel and it's got a flush constraint between those two planes and the made of the axes and then it's got that rotational degree of freedom than i wanted okay perfect all right let's go and delete that clear it out for the next run okay so the last component i want to do here is do the um i was going to put the the bushing on the flywheel but that's going to be the same thing we'll just use we would just use an insert constraint add some names entities i think we've already seen an example of that so i'm going to skip that and let's just go straight to the bolts so on the example assembly over here we'll see that they've got these bolts here and i've already taken a look at what those are inside the content center and that's going to be a cross recessed pan head machine screw so if we go up here place from content center so this is important we you got to figure out which category you need to grab a family from so that's going to be under around so fasteners bolts round head so we want to make note of that because we're going to have to put tell that put that in the ilogic snippet to tell it where to look and then we also want to make note of the family that we're looking for so i've got cross recess pin head machine screw type one inch so that's the family we're looking for right there and if we were to place one then so this is going to be a one quarter by one and a half unc okay so that's what we're looking for so i'm going to go ahead and take a i think it's a snip of that because i'm going to want to reference that here in a minute especially the family name there and there's no way i'm going to remember all that so i've got a screenshot of it here all right let's close that and let's just go ahead and place it just in case we need it to refer to it again quickly okay let's come back over to here go into our rule all right so we are going to place chassis bolt all right so we're not going to use the the same add component that we were using before because we need to access content center so we're looking for this right here add content center part so let me drop that in now this snippet is a little unusual because it actually drops in two it's like it's gonna if we ran this it would add two content center parts but the reason they did that is because there's actually two different methods of adding a content center part and they wanted to have the snippets show an example of each of those so that's why there's two in here we only need one but we want to figure out which method we want to use so this method here you'll see the first thing that you input here is going to be the name of the component just like we did up here the this will be the browser name once it gets placed and this right here is going to be the the category structure that we need to navigate through so fasteners bolts um this is giving us most of the way there we just need to change this to round head because that's the final category that it's in and then this is going to be the name of the family and then this right here is going to be the string that uniquely identifies one of the rows inside of that family table specifically it's going to look for this string inside of the column it's named designation and content center basically enforces each family has to have a designation column so that's good you can and and they all have to have unique values so that is a good way to uniquely identify a row from any family so that would be a good way to do things but the trick is if you ever have like if you have a an ilogic rule that says okay for one product type i have let's say i have a an assembly i'm trying to configure where i can switch between product types and it configures different things and for one product type it's got uh it needs to place something from one content center family and for another product type it's got to place something from a different content center family then that's fine i could use the designation but there's no guarantee that the desert the format of the designation string is going to be the same between both of them because that's completely up to how whoever created the family and how they decided to or organize that designation column so you might have to write some special casing that says okay for this product type in this family this is what the designation string is supposed to look like and for this other family it's gotta be different so um it's certainly doable but it just can get a little bit tricky and so they've got this they've given us this other method of doing it instead of calling out the designation you'll see most of this is the same that's the component name there's our our category structure there's the family name and then instead of just a single string for the designation we have this array of key value pairs and this right here basically means it's a way for us to specify okay i want you to look in this column name designation for this value and then look in this column threadlink for this value and then we can continue to add more depending on how many columns it takes to uniquely identify a content center part so the logical thing to do would be to use the key columns like the ones you use to actually pick apart when you're placing one manually but it doesn't have to be key columns so and the the difference why you might want to use this one over this one is like i was saying sometimes the designation formatting is not always well it's definitely not guaranteed to be consistent so instead you could just go by which columns you want to look up so we're going to use this second method i'll show you how that works so we don't need this first one i'll go ahead and delete that and we're going to use this so this is the name of the component that's uh when it gets placed the browser name so we'll just call this uh chassis bolt one and okay so like i said this is mostly gets us there we aren't fasteners we're in bolts we just need to change this to round head so that was the category that it was in and then this is the name of the family which is going to be cross recessed pan head machine screw space dash space you got to make sure you get it exactly like it's written out type type one but it's not a one it's actually an i so make sure i put that and space dash space inch okay so there's that let's bring that down to make it more readable okay now we need to specify which columns we want to use so let me pull my screen snippet over here these are the key columns that you use to uniquely pick a row when you're manually placing so it makes sense to go ahead and use these and you have what you can put the value that you can put in here it can be either the actual the display name of the column or each column also has an internal name so the display name is you can it can be anything and even more than one column can have the same display name but which could definitely be a problem trying to specified in eye logic but each column also has a unique internal name so they're guaranteed to be unique so that's probably makes the most sense to try and use that in fact i think they're in this family there are actually two columns that are named thread description so if we try to just use that it's not going to know which one we're talking about and it'll fail so we definitely want to use the internal names of these columns so what's displayed here is the display name so we don't want to use these but we need to go look up what the internal names of those columns are going to be so i'll save this close it let's go back well i guess we can just go to place from content center right here there's our family if we open this up and we go to the table view so each of those key columns are going to show up in red and you'll see as i hover over it it tells us what the internal name of that column is so instead of nominal length we'll want to use nlg let's go down here thread type is going to be ts thread description is size underscore sel okay um yeah all right so let's do that so now we know what columns we're looking for let's go back into our rule and let's see the first one uh let's do as size underscore sel that's going to be our thread size and that will be i wanted one quarter so basically put in exactly what it looks like in that column so instead of 0.25 it is 1 4. so i want to make sure i put it in so it finds what it's looking for and let's see the next one is nlg which is our nominal length which was 1.5 and then we i need to add another one for a third column so we'll just add a comma after that and then add our column internal name which was ts for the thread and then the value that we wanted to look up is going to be unc okay and then this stuff is the same as it was for the other ad components position grounded etc we don't need to worry about those all right so let's go ahead and make sure that works make sure we haven't made any typos or anything in there but let's just run it see what happens there we go no errors i see a bolt there that's what we want it's not constrained yet we'll take care of that okay let's go back in and add some constraints all right so this one let's go back out here take a look at our example assembly so this one i want to basically constrain to this hole back here and then we'll do we'll constrain one and then we'll create a rectangular pattern to place the other three um but this one so i can add a go into the engine chassis part and then you know name this edge assign a name to it and that works just fine and we can do an insert constraint but i can't do that with the content center part right because this is a standard content center part it's read-only i can't modify it so i don't have the option to go in and name one of these edges so instead we also have the option of using the origin i can figure out where the origins at and then create some origin constraints and do it that way or i can use what's already in here the look at the imates that are in there so there's an insert half of an insert constraint right there that's exactly what i want so in order to match that up with another imate i'm going to go ahead and go into my chassis and just create the other half of that i made where i want it so let's go to our manage tab and create imate and this is going to be an insert type constraint and we do want these to be opposed and we want it on that edge right there let's go ahead and give this a name insert i think the one in the content center part was named insert in1 so we'll just give it the same name and there we go now we've got our image there save that back to our ilogic rule and take a look at the snippet for placing an imate so uh constrain and we're going to go down here so there's there's two of them there's add imates and then i made add by i made an entity so we could have named the circular edge in the chassis part and then use had the half of the image that's in the content center part and the the entity named entity in the chassis and that would work we could use a snippet to connect those two that way but i want to use this one that's at imates so just drop that snippet in and this will be our name which is just chassis bolt and uh let's see the first component we're constraining is the chassis and the name of the imate this will be the name of the imate that we're doing so this is insert space in1 and then the bolt that we've placed put its name there and it's also insert in one all right let's test that out save run there we go there's our bolt and there's our imate connected up all right so last step is to create the pattern and this is really simple go down here and pattern the chassis bolt all right and we are going to go right here and we've got we can do circular pattern rectangular pattern feature-based patterns we obviously want rectangular pattern we'll just call this chassis bolt and this will be the name that gets created of the pattern in the browser so i'll just call that bolts and then this is the name of the component we're patterning so that'll be our chassis volt this is the quantity in the first direction so we want two and then this is the direction or sorry the spacing which is 2.5 and then this is the object we could give it an object um basically whenever you create a pattern you have to pick an entity to give it a direction like a for the column in the row and you can either pick you can pick something that's inside of a like a sub component like an origin of a sub component or an edge of a sub component if you're doing that you have to tell inventor this is the component i want you to look into and so if you are doing that then you give it the actual you could give it a component occurrence object here but in this case i'm just going to go with the assembly origin so i don't need to give it a component so that's why nothing is fine i'm just going to leave that at nothing and then uh let's see what access are we working at we want i think that is x-axis yep that's x-axis so that's good we'll leave that and then natural direction true is good uh now this is for the second direction quantity of two is good the spacing for the second direction is 5 and the entity name for this is going to be our z axis and the natural direction true is good on that one as well and that's it so let's go ahead and do that um if you if you get it and the you know it's patterning in the wrong direction so you just go in and flip that natural direction from true to false and then it'll flip it to go the pattern the other direction for whichever row or column so but in this case that's exactly what we want all right um i think we're getting close to the end here so we should probably stop there and maybe open it up for some q a yeah um let's let's go ahead and take a look i know there's a number of questions that we need to get to so let's uh let's jump over there to q a so if you haven't already typed your question in go ahead and do so and we'll go ahead and start addressing them start from the top um all right so what versions of inventor have the simplified ilogic functionality i'm pretty sure it's 2019. yeah yeah i know for sure 2019 does have it i'm pretty sure 2018 doesn't so i think that's the version they introduced it yep boom that's two questions done i'll take that because the same question twice um what do you need to get files from the vault if they don't exist locally um that is the thing these snippets are assuming that the files are available locally there's there's no interaction with the vault here at all if you needed to have some interaction with the vault that gets into some pretty deep fault api stuff which is doable but it is definitely a lot trickier so yeah if you're going to be running stuff like this the stuff definitely has to be local with the exception of placing content center parts if those are not local they have uh built those content center ad component snippets to actually pull them from the content center library itself and so if those aren't local they will get created on demand all right so that takes care of that um what's the advantage of using like named edges or feature naming instead of using attributes um i mean they're really kind of the same thing the the right clicking on a an entity and giving it an assigning a name is actually taking advantage of attributing it's doing that in the background it's just a much more user friendly front end for doing that so and you also get the nice little display of the little label pointing to it so it's it's using the same functionality in the background it's just a different it's a more useful interface to get to the same result essentially yeah um good friend andy here we use content center that's located on the vault server i've noticed that it's slow when running replace or change size rules is there a better way to have this replaced quicker possibly using eye parts if it was up to me i may or may not just get rid of the concept of my parts myself i know i feel very strongly about that yeah yeah me too the only eye parts are useful for creating content their families and that's about it for me um i don't know it it depends yeah would be network thing too right so what was that perhaps yeah it might be a network thing right so like and yeah i know i know i talk to you on a pretty regular basis andy um let me know what kind of slowness it is right whether that's seconds or hours or i don't think it's hours or minutes or something um let me know all right jeff asks a question here i've got a part that has a custom user form can you write ilogic code to bring up that form so the end user can enter custom dimensions before placing the answer is yes yeah yeah you can there are snippets for launching forms um go in here to forms yeah so i don't know that you can have this rule launch a form from another part specifically but what you could do is you could have this rule launch another rule that's in a component run rule and component and that rule then launches the form so because i don't see a show form in other like to run a line you'd have to run another component you have to run the rule to the part you have to watch there's a rule in another part which runs the form for that part um is it possible to use ilogic to add structural shapes from the content center um is that for like the context of frame generator that would be interesting to know jeff because that's a good question very tricky i know that this these snippets up here this um ad content center part is only for standard content center parts not custom content center parts and all of the structural families inside of content center are custom families and when i say custom i don't mean like the user created the family but it has a custom column which means when you place it you have to choose like with the length essentially the length of the member right you have to choose what the length of the memory is and then it instead of saving it into the standard content center files folder it saves it into the custom folder yeah and so i know for sure that this this snippet does not work with those custom families it only works with standard families and again i'm not talking about like custom fam like custom content that the users have created like if you've made your own families of components you can by all means use them as long as you're placing them as standard if that hopefully that makes sense yeah hopefully that makes sense um it does to me so um yeah everybody else if you have any questions about that let me know um but long story short jeff or jeffrey i guess it is uh for frame generator and tubing pipe like routed system specifically um for like structural shapes and i logic they often times don't play very well together yeah the api just really isn't developed for interacting with those those tools like frame generator tube and pipe so yeah there's that's an area that needs some more development for sure can imates be created on feature geometry programmatically using assigned names with ilogic it's also something i'm not a huge fan of good question uh i don't think there's a snippet for that but something so too i think you'd probably have to go in the api yeah i think you'd have to go to the api for that um are you going to do a session on automating the drawing for this assembly so drawing automation is a whole other ball game because there's so many options when placing the component um specifically the location in which the view gets placed um so when you get to drawing automation it gets a little bit more complicated and by a little bit i mean a decent amount more complicated yeah um although i do know in this version of version uh the most recent version 2021 they did add a lot of new snippets down here for drawing automation so these are your classic drawing ones for basically scaling and placing views and stuff but this drawing section they've actually added a lot of really cool stuff for creating dimensions balloons leaner notes all that kind of stuff so definitely if you're interested in that definitely take a look at these go through the help documentation find out exactly how these work there's a lot of power here they've added yeah so you're going to want to uh definitely do some reading and i know that recently one of our other uh developers here at kativ matt bussey i think he did a an ava on some basis some basic stuff and drawing automation yeah so yeah go look at our youtube channel and go back to the ava history and i think you should be able to find one yeah it was it was pretty recent i think it was it was this year sometime and then tyler asks can you access the project files reference list with ilogic sometimes the components aren't always in the same static folders uh yes you can access well there's not a snippet for that i wish there was because um it's definitely useful but uh yeah there's an api call for getting to the let me see if i can remember off top my head hits like this location dot uh design project yeah there we go design project manager dot activedesignproject.path i uh think path there works come on where's my work space path there we go so that'll get you to your workspace pass and then you can you know go from there to get to somebody and the object model is my best friend oh yeah absolutely yeah if you if you don't already have one you should print it i'm just telling everybody on the call print it and put it on your wall it makes things a little easier sometimes and printed as big as possible i know that oh yeah it's time i remember eric had this huge object model poster at his desk um that's hilarious but um what's faster linking to excel or having excel parameters read using ilogic same concept probably you mean like an embedded excel sheet is probably what they mean i guess excel parameters that i think is definitely going to be faster because those parameters are already there and the model inventor doesn't have to launch up excel to read those so that's definitely going to be faster yeah jeff uh jeffrey miller is mentioning uh he wants to use the standard structural shapes to generate assemblies not necessarily using frame generator but using those components yeah just placing them straight from content center yeah i would be wary about that it like i said that's the snippet here is not going to do it for you but uh you could probably get into the api i think i've tried it in the past but it's been long enough i don't remember what the results were try it let us know how it goes yeah yeah because i i mean that stuff is there in the api but accessing the content center through the api's is a little tricky and placing parts custom i'm not sure if the api has the functions necessary to do that but right and then memory is hazy on that one yeah got time for a couple more questions um can you use ilogic to change the size of a content center part example change the length of a bolt absolutely um yes but this the snippet there's not a snippet for that um basically what you could do is you basically just replace it with a new one you just run this ad by i'm or add content center part again one part that i didn't go over that i i was going to if i just ran out of time was this managed components thing which you know if you place a component and there's already one in there and vendor's going to freak out because hey that one's already there you can't do that so this manage components thing if you add that in it'll actually know anything that you're using these add part or add content center part or whatever it knows okay if there's one already in there i'm going to delete it and it manages that automatically which is really slick so you could just have it just run this again and then you could instead of just having a static hard-coded size you could have this driven by a parameter or something i was going to show an example of this i just ran out of time but we'll do next time yeah it's it's really slick how it works you just add this managed component this snippet is kind of atrocious it's it's got a whole bunch of extra stuff there as an example for you but basically all you need the important parts of it are these two items right here begin manage and end manage you just place this above at the start put all of your ad and create constraints and all this stuff and patterns even in between the begin and end and it handles all that deletion for you it's really slick yeah we'll go over that next time i think that's super useful yeah um that's all the time we have for questions now there's a couple more but they look kind of specific to some certain people's workflows um if you have questions about what you're doing specifically and some of the errors that you're running into yourself definitely reach out to us it's hard for us to diagnose what's going on with uh with your code or whatever if uh if we're here on a webinar so yeah um long story short reach out to us and uh we'll see what we can do to help uh so i think that's all the time that we have for today um again thank you uh cameron for joining us uh for today's ava i know that we you know based on the questions it looks like there's a lot of interest and it looks like we can come up with a lot more sessions in the future so definitely be on the lookout uh for cameron's name on the calendar again nine ninety percent of the time i think cameron's gonna do something inventor related um and most of those are gonna be automation related since you know he is one of the people on that team and that's kind of our bread and butter here at katy so uh cam thanks again for joining us my pleasure thank you thank you everybody for joining us um on the web as well we'll see you again uh at 10 a.m pacific next week thanks everybody bye bye
Info
Channel: KETIV Technologies
Views: 5,398
Rating: undefined out of 5
Keywords: autodesk, akn_include, autodesk virtual academy, ilogic, automated assembly generation, ilogic assemblies, components, inventor, autodesk Inventor, ketiv ava, inventor ilogic, ketiv academy, ketiv autodesk academy, ketiv technologies, design automation, inventor 2018, autodesk academy, ketiv technologies inc., autodesk software, ava academy, rules driven design, computer aided manufacturing, autodesk inventor 2020 assembly tutorial, inventor 2019, ava: introduction to ilogic
Id: o9MZPv6_G_0
Channel Id: undefined
Length: 61min 34sec (3694 seconds)
Published: Tue Sep 22 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.