Community
Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iLogic to create and display/insert custom iProperties in template

4 REPLIES 4
Reply
Message 1 of 5
eric941
692 Views, 4 Replies

iLogic to create and display/insert custom iProperties in template

I have spent hours searching  the forums for a way to use iLogic to create custom iProperties from the cells in an Excel spreadsheet (both text and numbers) for a .dwg template. The only thing even close has been a user who already knew how to do it and was having a different problem. I am using Inventor 2012 and Excel 2003 and have very little experience with VB. I currently have a family of assemblies, consisting of two parts linked to an Excel spreadsheet to control the various parameters for each variation of the assembly.

 

I need some help creating an iLogic rule that will:

Go to a specific tab (I have four different tabs/worksheets) in an Excel spreadsheet.

Make a specfic row of that worksheet the current row based on the part number used to generate the models of the assembly shown in a .dwg.

Use the contents of a cell in that row (text or numeric or a combination of both) to generate a custom iProperty for the .dwg template.

Use the custom iProperties to fill in the title block of the template.

 

Any help using the specifics of the spreadsheet attached in an example of iLogic will be greatly appreciated.

 

Eric

 

4 REPLIES 4
Message 2 of 5
swordmaster
in reply to: eric941

Eric,

I believe i was able to accomplish this in a .ipt , hsve not as yet tried with a .idw

I embedded your workbook into the part and used the following ilogic code, i hope it help in a small way

 

i

= GoExcel.FindRow("3rd Party:Embedding 1", "123", "part_number", "=",iProperties.Value("Project", "Part Number"))

iProperties.Value

("Custom", "eric_custom") = GoExcel.CurrentRowValue("oal")

iLogicVb.UpdateWhenDone

= True

InventorVb.DocumentUpdate

()

Inventor 2010 Certified Professional
Message 3 of 5
eric941
in reply to: swordmaster

Thank you for a prompt reply, Swordmaster. I will attempt this code as soon as I can and let you know how it works. Is embedding the same as linking the spreadsheet to the model / assembly?

I have been working with Inventor for just over a year and found many helpful tips and other code to use, but it is frustrating when I can only work with the program for 2 to 6 hours per week at most...some weeks not at all.

Eric

 

Message 4 of 5
swordmaster
in reply to: eric941

Eric,

Apologies for the late reply, I have been hiding from Hurricane Isaac

Linked and Embedded are a little different

For values that will change (user selection) i use a linked workbook

For values which are constant (look up values) i use a embedded workbook

 

Linked workbooks are normally stored in the same folder as the model

Embedded workbooks are as the word implies "embedded" in the Inventor model and the workbook does not reside in any folder.

When using a embedded workbook it is possible to access different worksheets using ilogic

When using a Linked workbook only the first worksheet(sheet 1) can be accessed

Inventor 2010 Certified Professional
Message 5 of 5
eric941
in reply to: swordmaster

Thanks again Swordmaster~! Sorry it took so long to reply. I think your explanation of the difference between linked and embedded workbooks helped clarify one of my issues. It would appear I am not going to be able to make the assembly variations as easy to generate as I had hoped.

WIth respect to the iLogic I wanted to populate fields in an .idw, I have finally stumbled on the solution in the Wiki help files. I don't know why it took me so long and, as always, the solution is so simple it boggles my mind that I didn't find it sooner. I only needed to write a rule which would generate the custom iProperties in the .aim of the first view listed in the browser tree of the drawing. Then I was able to edit the definition of the drawing and use those custom iProperties to populate the title block.

Best,

Eric

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

Post to forums