Inventor Customization

Inventor Customization

Reply
Contributor
truscher
Posts: 22
Registered: ‎11-09-2010
Message 1 of 7 (400 Views)

populate assembly text iproperty with concatenated list of iproperty vaules

400 Views, 6 Replies
02-14-2012 09:41 AM

OK, this is a bit difficult to explain, so bear with me! In the parent assemby a text iproperty exists called "child list". I would like to set this value via an ilogic rule that does the following:

 

For each child in the assembly where paremeter "include" = true, add the value of iproperty "filename" to a comma delimited list that will become the value of  text Iproperty "child list" in the parent assembly.

 

The result should look something Like iproperty"child" = "filename1,filename2,filename3,filename4, etc..."

 

The rule must iterrogate all children, both parts and assemblies, and must go beyond 1st level children.

 

The output does not have to be comma delimited but must be delimited with something (eg tab, :, etc..)

 

The number of children is unknown

 

Is there a character limit imposed on a text iproperty?

 

 

Please don't hesitate to ask for clarifiation if my explanation doesn't make sense, this is not a simple one to put into words...

 

Many Thanks,

 

Tom Ruscher

 

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 2 of 7 (379 Views)

Re: populate assembly text iproperty with concatenated list of iproperty values

02-15-2012 10:10 AM in reply to: truscher

There's a limit of 1 Meg on the total size of the custom iProperty set.  So if a single iProperty got close to 1 Meg in size, it would crowd out other iProperties.
Are you going to fill in a custom iProperty named "filename" in each part and assembly?  Or do you want to use the actual filename?



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Contributor
truscher
Posts: 22
Registered: ‎11-09-2010
Message 3 of 7 (368 Views)

Re: populate assembly text iproperty with concatenated list of iproperty vaules

02-16-2012 08:03 AM in reply to: truscher

     The intent is to track this iproperty in vault and querry this value via sql to link our erp software. I was thinking the filename property because this tag must be unique and we enforce unique filenames in the vault.  This would allow sql to identify the parts of an assembly that we want to link (e.g. include=true/false), and pass other Iproperty data to specified fields in the erp.(e.g. size, finish, machine centers,.etc...). While the assembly size is unknown, a large one would be on the order of 200 parts, of which maybee 75% would be "included"

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 4 of 7 (366 Views)

Re: populate assembly text iproperty with concatenated list of iproperty vaules

02-16-2012 08:09 AM in reply to: truscher

OK, so you want to use the actual filename of the file.  That's not a really an iProperty, although it is shown in the iProperties dialog.
 What you're asking for should be possible.  I'll try to put together a sample rule and post it.



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 5 of 7 (354 Views)

Re: populate assembly text iproperty with concatenated list of iproperty vaules

02-20-2012 10:19 AM in reply to: truscher

  Here's a rule that should do it.  The vertical bar character cannot occur in filenames, so I used it as a separator.  You could use a tab instead.  The tabs won't display in the iProperties dialog, but they are stored in the property.
  In Inventor 2012, this rule will automatically create a custom iProperty named "children" if it does not already exist.  But if you're using Inventor 2011, you would have to create this iProperty before running the rule.



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Contributor
truscher
Posts: 22
Registered: ‎11-09-2010
Message 6 of 7 (348 Views)

Re: populate assembly text iproperty with concatenated list of iproperty vaules

02-20-2012 11:30 AM in reply to: truscher

Thanks For the Help! I'll give this a try and leyou know if I run into any further difficulties. One other question that I would like to ask is If you could recomend any reference books that may be helpfull for someone trying to learn iLogic (or vba). The code snippet generator has been a great help with syntax, etc... for what it covers, but  seems to pretty short on details for creating the kind of logic required for this sort of problem. Once again, Many thanks and any recomendations you could make for further study will be greatly appreciated.

 

Regards,

Tom

Employee
MjDeck
Posts: 959
Registered: ‎02-24-2009
Message 7 of 7 (341 Views)

Re: populate assembly text iproperty with concatenated list of iproperty vaules

02-21-2012 08:36 AM in reply to: truscher

Tom,

 To implement this rule (and to do a lot of things in iLogic) requires using the Inventor API.  Help for the API is available under Help -> Community Resources -> Programming Help in Inventor.  A good API resource is the blog Mod the Machine
 If you're new to VB.NET, it is easier to get an introduction to it using Visual Basic Express than it is with iLogic by itself.



Mike Deck
Software Developer
DLS - Mechanical Design
Autodesk, Inc.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.