Problem calling Revit Document

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Calling a form from class library. Error with rvtDoc and selSet.
Imports System
Imports Autodesk
Imports Autodesk.Revit
Imports System.Windows.Forms.Application
Imports Autodesk.Revit.DB
Imports Autodesk.Revit.UI
Public Class AnForm
Inherits System.Windows.Forms.Form
Implements Revit.IExternalCommand
Public elem As Element
Public Function GetParent(ByVal application As Creation.Application, ByRef message As String, ByVal elements As ElementSet) As Result Implements Revit.IExternalCommand.Execute
' get hold of a revit document.
'
Dim rvtDoc As Document = application.ActiveDocument
' get a list of selected elements.
'
Dim selSet As ElementSet = rvtDoc.Selection.Elements
' how many did you get?
Thank you,
Bob V