I would like to open a rhino file in inventor and have every object show up as a part. It seems the best way to do this is turning every object into a block and saving as a .stp, but that’s a lot of work turning everything into an individual block instance. Is this indeed the best way and would it be possible to create a macro to automate? never used macros before. im on rhino 7 and inventor 2022.
Thanks
Hi Kurt - this would be easy enough to script - replace each object with a block instance based on the bounding box center or something like that - but I am not sure that will be of much use - wouldn’t you want some hierarchy, logical blocks within blocks structure so it makes some sense in the target application?
Not sure what logical blocks are, but I think I get your point. i rarely use blocks and mostly rely on layers to organize components. what would be ideal would be if the script could label each individual block based on the name of the layer it’s under in rhino. so if i have 7 ribs under the layer name ribs, it could make each 1 a block called rib 1, rib 2, etc. @pascal
Yes, that is what I was getting at - some logical structure to the blocks so that they could be nested in a sensible way.
@user1089 -in the target application, if your 7 ribs are all the same, I assume what you’d really want is that each rib is an instance of the same block, otherwise in the target application you’d get seven separate and unrelated rib parts which might or might not be very good. In other words, for some of this, it would take some work on your part in Rhino (I think) for it to be really useful - that is, use blocks to build up your parts where ever that makes sense.
Well, actually I think I do want individual instances because one of the main reasons for this is to populate the parts list in inventor with the correct quantities. I first selected each of the components by it’s layer and made them blocks, but then in inventor it has a qty of 1 for each components. This didn’t take too long to do, but now realizing that each part needs to be it’s own block instance is why I am asking about macros. Any advice on where to go or what to read for someone who has never written one?
can anyone point me in the right direction with this? im already stumped as to how or if it’s even possible to do this without being prompted to select each piece, which defeats the purpose. the main thing i want to do is have it run through every object automatically. is this possible?
that would be awesome. im not sure how the block insertion point affects things, but when i did this manually for myself i just made them all 0,0,0. whatever is easier for you. thank you @pascal
@user1089 - it occurs to me you might want to do this as part of an export process but not have the blocks and block defimitions left hanging around when done…?
that would save a step, but what i have more of an issue with is the file name prefix attached to each block name. instead of pipe crate 10ft6in…to just start the name with the component…feet, or floor panel, etc. @pascal
thank you…and less important, but if it’s not difficult to number them just 1,2,3 / individual name, ie: rib-1, rib-2, side panel-1, side panel-2,etc. right now it seems to have numbered everything 0 - 100
No worries, I am glad it helps, - I still think a more sophisticated exporter that uses layer hierarchy to create the blocks would be a worthy project, I have it started around here someplace.
I think so. I love rhino, but the company I just started at wants to use inventor at least to produce drawings. Even when I get more familiar with inventor I think I am still going to prefer rhino. Anything that would make these two ‘talk’ to each other better would be really great. If there’s a way to ‘link’ them, so that as the model updates, so do the drawings in inventor. Not sure how feasible that is, but would be a really cool feature
Hi Pascal, first of all thank you very much this is amazing.
second, I need a small change for this:
as you know in solidworks or other cad packages the BOM generated based on part numbers and their quantities. So instead of incrementing the number of same objects in a layer, I need to Replace the block.
in other words I need to have for example: 5 blocks named: M5_hex_bolt when I have a layer named: M5_hex_bolt with 5 objects in it.
Thanks in advance.