VBA Macro - Get Number Of Drawing Sheets

VBA Macro - Get Number Of Drawing Sheets

isocam
Collaborator Collaborator
178 Views
1 Reply
Message 1 of 2

VBA Macro - Get Number Of Drawing Sheets

isocam
Collaborator
Collaborator

Can anybody help?

 

Is it possible, using an Inventor VBA macro, to get the number of sheets a drawing has and show the number in a message box?

 

Basically, if a drawing has more than one sheet, I want to know (for testing purposes) the total number of sheets a drawing has.

 

Many thanks in advance!

 

Darren

0 Likes
179 Views
1 Reply
Reply (1)
Message 2 of 2

bradeneuropeArthur
Mentor
Mentor

 

Dim inv As Inventor.Application
Set inv = ThisApplication
Dim d As Inventor.DrawingDocument
Set d = inv.ActiveDocument
'Dim s As Inventor.Sheet

MsgBox d.Sheets.Count
	

This will do for VBA

 

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