REVIT VSTA Code to load a form via a macro

One of the tricks in my AU Class discussed how to display a Windows Form in REVIT .. the following code describes adding a form and passing to it the Active REVIT document as a variable so you have access to the doc from the form:

In the NEWLY Placed form :

Public Class Form1
    Public myDoc As ThisDocument = Nothing

 

Call it like so from your Macro:

        Dim myForm As New Form1
        myForm.myDoc = Me
        myForm.ShowDialog()


Tags: , ,
Categories:

0 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed