Hi,
I'm creating a batch application in Revit.
It should open some rvt's and do some checks on it.
I thought it was simple... but my code isn't working. I must be missing some basics..
I allways get a "Object not initialized" on the line mydoc = app.... Logical I think, but how should I initialize an app from within an IExternalApp ? (Not from a IExternalCommand !!)
Can someone help me ?Code:Public Function OnStartUp(ByVal myApp As UIControlledApplication) As Autodesk.Revit.UI.Result Implements IExternalApplication.OnStartup Dim app As Autodesk.Revit.ApplicationServices.Application Dim myDoc As Document myDoc = app.OpenDocumentFile("c:\\Temp\\test.rvt") Return (Autodesk.Revit.UI.Result.Succeeded) End Function


Reply With Quote