Inventor General Discussion

Inventor General Discussion

Reply
Valued Contributor
linuskotte
Posts: 66
Registered: ‎01-23-2012
Message 1 of 2 (198 Views)

iLogic for Export the iproperties

198 Views, 1 Replies
12-17-2013 08:53 PM

Hi,

 

I created one iLogic rule for exporting iproperties into excel sheet like below.

 

 

GoExcel.Open("D:\Properties\iPROPERTIES.xlsx")

GoExcel.CellValue("A3") = iProperties.Value("Summary", "Title")
GoExcel.CellValue("B3") = iProperties.Value("Summary", "Author")

MessageBox.Show("iProperties successfully copied!")

This is working for only one file but I want export all the inventor files properties into excel sheet in a current folder.

And next part properties sholud be in next row and third part properties shold be in third row Like.

 

Part2:

 

GoExcel.CellValue("A4") = iProperties.Value("Summary", "Title")
GoExcel.CellValue("B4") = iProperties.Value("Summary", "Author")

 

Part3:

GoExcel.CellValue("A5") = iProperties.Value("Summary", "Title")
GoExcel.CellValue("B5") = iProperties.Value("Summary", "Author")

 

Thanks in Advance 

 

Thanks and Regards,

LINUS KOTTE

Distinguished Contributor
naresh_kalyan
Posts: 154
Registered: ‎03-22-2006
Message 2 of 2 (111 Views)

Re: iLogic for Export the iproperties

03-17-2014 11:36 PM in reply to: linuskotte

Linus,

I have not that much exposure on iLogic. But, I would suggest you to do the same using VBA. It does much more options

 

Dim ofile As Scripting.file
Dim flsysobj As FileSystemObject

Dim sfolder As Scripting.Folder


Set flsysobj = New FileSystemObject
Set sfolder = flsysobj.GetFolder(opath) ' oPath Need to be defined by you

For Each ofile In sfolder.Files

   If Right(ofile.name, 4) = ".ipt" Or ".iam" Or ".idw" Then    ' need to be decided by you as per the files you are working with...
   Set odoc = ThisApplication.Documents.Open(ofile, True)
   
   ' wrtie the code which you have written in iLogic----------------------

 

     odoc.Update
    odoc.Save   
   odoc.Close   
   End If   
Next
Msgbox "Completed"


Have a good Day....

 

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.