Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

populate assembly text iproperty with concatenated list of iproperty vaules

6 REPLIES 6
Reply
Message 1 of 7
truscher
737 Views, 6 Replies

populate assembly text iproperty with concatenated list of iproperty vaules

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

 

6 REPLIES 6
Message 2 of 7
MjDeck
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
Autodesk, Inc.

Message 3 of 7
truscher
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"

Message 4 of 7
MjDeck
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
Autodesk, Inc.

Message 5 of 7
MjDeck
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
Autodesk, Inc.

Message 6 of 7
truscher
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

Message 7 of 7
MjDeck
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
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report