Jump to content
Developer Wiki and Function Reference Links ×

PIO with multiple instances of INOBJECT component.


Fuge

Recommended Posts

Hey Guys,

 

Does anyone have a clever way of creating a PIO where you have a large quantity of a component without having to create geometry of each inobject instance?

 

For example,   If you had a BOM and it required 12 screws...   I don't want to create 12 instances of the screw,  Maybe only one... but have my worksheet count a quantity of 12, but insert only 1 instance of the PIO (with a variable = 12) into my document.

 

Hope that makes sense...

Thanks for any insight...

Dave

Link to comment

Make the PIO into a Symbol. Then you will only have one instance of the geometry but can multiple instances.

 

Since the PIO is still inside the symbol Definition, you could take an Instance, and if there is only one item in the symbol use the Convert to Plug-in Object. If there are multiple item, use Convert to Group and then Ungroup is necessary. This will allow you to modify a single instance. If you need to modify multiple instances, make a new version of the Symbol, Edit the symbol to change the PIO and then Replace Symbol on the instances that need to be changed.

Link to comment

Thanks for the suggestion Pat...   Seems there's not really a clean simple way of doing it.    I was thinking inserting a PIO inside a PIO,  or even just a locus3D and multiplying it within the PIO.   The PIO i'm creating could have 12 of this,  4 of that and so on...  so it could get messy fast whichever way it's done...   Another program I was using has a special function for doing something like this...  One of the few things I like about the other program... Hence why we've moved back to VWs.

 

It would be great to see a built-in function for this...  something like    QTY(  LnewObj, 12 );      12 of the last new object...   super simple!

 

Dave

Link to comment

Maybe you can use a default library? In that library you have symbols of screws etc and your PIO imports the one you need and uses them. Good thing is, you don't need to create any geometry in your PIO, only place the needed symbol instance. They also show up in a worksheet (and yes, I know, these are bolts, not screws 🙂 ).

BTW, this tool is very fast, I filled in 1000 in numScrew and it takes less then a second to recalculate.

 

image.png.c47e436c64e51687c308a187564bf23b.png

 

PIO inside PIO would not be a good idea, because each nested PIO will be recreated (thus redraw the geometry) when you reset the main PIO. So it will be slower than just drawing the screw geometry inside the main PIO.

 

Something else you can do, inside your PIO, create the geometry once, and duplicate it the number of times you need it, but I don't see it making such a big difference than creating the geometry inside a FOR loop. In this case you do need to have a way to make these inobject elements show up in a worksheet, you can do this by attaching a record to them. Or, if it's just quantity, write that quantity to a parameter of the PIO and show that inside the worksheet.

 

I'm sure there are other ways of doing this too, these are the one I could think of 🙂 .

Link to comment

Hey Maarten,   Thanks for your reply....  Due to what we do, the components in the end,  probably won't be screws... that was just an example of what a component could be. 

 

When I mention PIO inside a PIO... I was thinking It would be nothing more than a dummy PIO..   My thought is it wouldn't have any geometry,  it would just be there to be duplicated in a For loop and would have a record attached to it,  as you mentioned,  for the the Worksheet to count.

 

Appreciate the ideas guys!!   thanks for your time..

Link to comment

Or, if you really want to count actual objects (even if they don't have any geometry), you could create a line with zero length and attach a record to that. We do that to be able to count subparts (for example, when you have a 2D only representation, and the objects above the cutplane will not be drawn, but you still want them in your worksheet, you could use this methode).

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...