Inventor General

Reply
Active Member
eric941
Posts: 9
Registered: ‎10-29-2011
Message 1 of 5 (466 Views)

iLogic to create and display/insert custom iProperties in template

466 Views, 4 Replies
08-25-2012 06:02 AM

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

 

Distinguished Mentor
swordmaster
Posts: 537
Registered: ‎12-15-2008
Message 2 of 5 (454 Views)

Re: iLogic to create and display/insert custom iProperties in template

08-25-2012 07:54 AM 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
Active Member
eric941
Posts: 9
Registered: ‎10-29-2011
Message 3 of 5 (428 Views)

Re: iLogic to create and display/insert custom iProperties in template

08-27-2012 11:44 AM 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

 

Distinguished Mentor
swordmaster
Posts: 537
Registered: ‎12-15-2008
Message 4 of 5 (391 Views)

Re: iLogic to create and display/insert custom iProperties in template

08-31-2012 01:33 PM 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
Active Member
eric941
Posts: 9
Registered: ‎10-29-2011
Message 5 of 5 (287 Views)

Re: iLogic to create and display/insert custom iProperties in template

11-25-2012 05:23 AM 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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube