Inventor General Discussion

Inventor General Discussion

Reply
Valued Contributor
66 Posts
2 Kudos
Registered: ‎01-23-2012
Post 1 of 2

iLogic for Export the iproperties

233 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
162 Posts
1 Kudo
Registered: ‎03-22-2006
Post 2 of 2

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....

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!