Drawing view events, on create new sheet

Drawing view events, on create new sheet

basnederveen
Advocate Advocate
1,057 Views
6 Replies
Message 1 of 7

Drawing view events, on create new sheet

basnederveen
Advocate
Advocate

Hi everyone

 

I was wondering if it is possible to create an event trigger that triggers when a new drawing sheet is created. If it is, how?

 

Kind regards

Bas

0 Likes
Accepted solutions (1)
1,058 Views
6 Replies
Replies (6)
Message 2 of 7

bradeneuropeArthur
Mentor
Mentor
Accepted solution

Hi Bas,

 

Yes:

 

Private WithEvents oUINewDrawingView As UserInputEvents


Public Sub Activate(ByVal addInSiteObject123 As Inventor.ApplicationAddInSite, ByVal firstTime As Boolean) Implements Inventor.ApplicationAddInServer.Activate
oUINewDrawingView = m_inventorApplication.ApplicationEvents
end sub

Private Sub UINewDrawingView_OnActivateCommand(CommandName As String, Context As Inventor.NameValueMap) Handles oUINewDrawingView.OnActivateCommand
            'MsgBox(CommandName)
            If CommandName = "DrawingNewSheetCtxCmd" Then
'Your code here
end if
end sub

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 7

basnederveen
Advocate
Advocate

Thanks again!

0 Likes
Message 4 of 7

Anonymous
Not applicable

Could you break down some of this information for me? It doesn't work if I just copy and paste it into my project, and I would like a better understanding of it anyways.

any help would be greatly appreciated.

0 Likes
Message 5 of 7

basnederveen
Advocate
Advocate

You can use userinputevents.onactivatecommand with drawingnewsheet command. If you need to do stuff on the new sheet before it is activated probably applicationevents.onneweditobject.

 

 

0 Likes
Message 6 of 7

Anonymous
Not applicable

Thank you. I'll try playing with those commands

0 Likes
Message 7 of 7

antoniobaron
Contributor
Contributor

I know i'm a little bit late, but these commands and instructions are for vb.net, vba, and add-in programming. So they won't work for ilogic.

There are various tutorials on autodesk university regarding addin development.

Cheers 

0 Likes