.. so I posted about a prank about making the explode command in CAD play a sound through lisp and someone joked about doing it in revit .. I figured I'd give it a shot!
I can wrap it into a plugin if anyone is even remotely interested, .. otherwise .. here is the code to make it tick .. and a sample video as proof LOL!
you gotta know the API (vb.net style)..
add a handler on startup:
and shut down to keep things tidy:
and the code:
I can wrap it into a plugin if anyone is even remotely interested, .. otherwise .. here is the code to make it tick .. and a sample video as proof LOL!
you gotta know the API (vb.net style)..
add a handler on startup:
Code:
AddHandler Me.Application.DocumentChanged, AddressOf ThisApplication_DocumentChanged
Code:
RemoveHandler Me.Application.DocumentChanged, AddressOf ThisApplication_DocumentChanged
Code:
Private Sub ThisApplication_DocumentChanged(ByVal sender As Object, ByVal args As Autodesk.Revit.DB.Events.DocumentChangedEventArgs) If args.GetTransactionNames(0) = "Explode Import Instance" Then My.Computer.Audio.Play("C:\Temp\explode1.wav") End If End Sub
Comment