I have created a forge app, for revit, using the provided deleteapps design automation template, and the design automation API. The goal of this app is to process and export content from revit file.
My question is, how to get the current working directory, in the app, when a workitem starts?
public void HandleDesignAutomationReadyEvent(object sender, DesignAutomationReadyEventArgs e)
{
e.Succeeded = true;
Export(e.DesignAutomationData);
}
There is ModelPathUtils.ConvertUserVisiblePathToModelPath(model);
but I dont want a path to a revit file, just a base path, where I can create folders.
Design Automation allows you to write to current working folder. It is a unique path for each job. You can call Directory.GetCurrentDirectory() to access the current folder.
string path = Directory.GetCurrentDirectory();
This will give you the root folder for a given job. You are allowed to create sub folders and save files within this folder.