Create a list in Excel with the properties of all the sheets whit ilogic

Create a list in Excel with the properties of all the sheets whit ilogic

andrescastellanosint
Contributor Contributor
1,239 Views
12 Replies
Message 1 of 13

Create a list in Excel with the properties of all the sheets whit ilogic

andrescastellanosint
Contributor
Contributor

Hello, I need to create a list in Excel containing all the iproperties of all the Sheets of drawings with ilogic.

thank's

0 Likes
Accepted solutions (1)
1,240 Views
12 Replies
Replies (12)
Message 2 of 13

bradeneuropeArthur
Mentor
Mentor

What do you mean with all the sheets.

All the sheets in one drawing?

All the drawings in one folder?

What do you mean with the iproperties of the sheets?

Sheets have no iproperties, drawing have!?

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 13

andrescastellanosint
Contributor
Contributor

hello, my Drawing has more than one sheet, and each one has a different description, I would like to extract a list in excel where this information wasimage001.png

0 Likes
Message 4 of 13

andrescastellanosint
Contributor
Contributor

This is code:

 

On Error Resume Next

 

Dim oDoc As DrawingDocument

 

oDoc = ThisApplication.ActiveDocument

 

Dim oSheetS As Sheets

 

Dim oPromptEntry

 

 

Dim oALLSheet

 

oCurrentSheet = oDoc.ActiveSheet.Name

 

i = 1

 

For Each oSheet In oDoc.Sheets

 

  i = i+1

 

  ThisApplication.ActiveDocument.Sheets.Item(i).Activate

 

       oTitleBlock=oSheet.TitleBlock

 

    oTextBoxes=oTitleBlock.Definition.Sketch.TextBoxes

 

    For Each oTextBox In oTitleBlock.Definition.Sketch.TextBoxes

 

    Select oTextBox.Text

 

        Case "CONTIENE"

 

            oPromptEntry  =  oTitleBlock.GetResultText(oTextBox)

         

 End Select

 

    Next

 

Next

 

 

xlsxPath = "C:\Users\castellanos.andres\Desktop\Mass Properties.xlsx"

GoExcel.CellValue(xlsxPath, "Hoja1", "A2:A25")=oPromptEntry

GoExcel.Save

 
But not to do the loop to get the value of all the sheets
0 Likes
Message 5 of 13

So these are not I-properties, but text fields in the drawing, correct?

 

Please let me know if I understood this correctly, than we can proceed...

 

Regards,

Autodesk Software: Inventor Professional 2018 | Vault Professional 2018 | Autocad Mechanical 2018
Programming Skills: Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Dimension Component! | Partlist Export! | Derive I-properties! | Vault Prompts Via API! | Vault Handbook/Manual!
Drawing Toggle Sheets! | Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 6 of 13

andrescastellanosint
Contributor
Contributor
 yes, that's right
 
 
0 Likes
Message 7 of 13

Ok that is clear than.

I will prepare something and come back to it....

 

Regards 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 8 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support

@andrescastellanosint,

 

Hoping that below iLogic code may be helpful.

On Error Resume Next
 
Dim oDoc As DrawingDocument 
oDoc = ThisApplication.ActiveDocument
 
Dim oSheetS As Sheets 
Dim oPromptEntry 
 
Dim oALLSheet 
oCurrentSheet = oDoc.ActiveSheet.Name
 
Dim oList As New ArrayList 
For Each oSheet In oDoc.Sheets 
 
	oSheet.Activate 
	oTitleBlock = oSheet.TitleBlock  
    oTextBoxes=oTitleBlock.Definition.Sketch.TextBoxes 
    For Each oTextBox In oTitleBlock.Definition.Sketch.TextBoxes
 
    	Select oTextBox.Text
 
        Case "CONTIENE" 
            Call oList.Add(oTitleBlock.GetResultText(oTextBox))         
 		End Select
    Next 
Next 

xlsxPath = "C:\Users\castellanos.andres\Desktop\Mass Properties.xlsx"
GoExcel.CellValue(xlsxPath, "Hoja1", "A2","A25")=oList 
GoExcel.Save
GoExcel.Close 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 9 of 13

andrescastellanosint
Contributor
Contributor
Friend thanks for your help, but does not save me any data on the spreadsheet
0 Likes
Message 10 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support

@andrescastellanosint ,

 

Is it possible to provide drawing document to test ? please make sure that files are non confidential.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 11 of 13

andrescastellanosint
Contributor
Contributor

This is the problem, the drawings are of type cofindencial.

My code works, will only need to create a loop where I save the result into a variable. I have not succeeded.

 

In the following pictures you can see how the code works, I need is to create a single text message that contains the three data of the pictures.
 

if you could help me?

 

 

image001 (1).pngunnamed.pngimage003.pngimage004.png

 

 

0 Likes
Message 12 of 13

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@andrescastellanosint ,

 

Hope below iLogic code helps.

On Error Resume Next
 
Dim oDoc As DrawingDocument
 
oDoc = ThisApplication.ActiveDocument
 
Dim oSheetS As Sheets
 
Dim oPromptEntry As String 
 
 
Dim oALLSheet
 
oCurrentSheet = oDoc.ActiveSheet.Name
 
i = 1
 
For Each oSheet In oDoc.Sheets
 
  i = i+1
 
  ThisApplication.ActiveDocument.Sheets.Item(i).Activate
 
       oTitleBlock=oSheet.TitleBlock
 
    oTextBoxes=oTitleBlock.Definition.Sketch.TextBoxes
 
    For Each oTextBox In oTitleBlock.Definition.Sketch.TextBoxes
 
    Select oTextBox.Text
 
        Case "CONTIENE"
 
            oPromptEntry  =  oPromptEntry & oTextBox.GetResultText(oTextBox)
         
 End Select
 
    Next
 
Next
 
 
xlsxPath = "C:\Users\castellanos.andres\Desktop\Mass Properties.xlsx"
GoExcel.CellValue(xlsxPath, "Hoja1", "A2:A25")=oPromptEntry
GoExcel.Save
GoExcel.Close

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 13 of 13

andrescastellanosint
Contributor
Contributor

Thank you friend is just what I needed

0 Likes