External Command-Document are temporary disabled

markjvlampad
Advocate
Advocate

External Command-Document are temporary disabled

markjvlampad
Advocate
Advocate

Does anybody experience this kind of external command error?

 

how did you sort this out?

 

when I use this in macro it works perfectly. but when I use external command, I get the error.

using (Transaction t = new Transaction(doc,"Create ViewSet"))
{
t.Start();
string setName = "SheetSet Name";
try
{
viewSheetSetting.SaveAs(setName);
}
catch (Autodesk.Revit.Exceptions.InvalidOperationException)
{
TaskDialog.Show("Error", setName + " is already in use");
t.RollBack();
return;
}
t.Commit();
}

0 Likes
Reply
Accepted solutions (1)
483 Views
1 Reply
Reply (1)

jeremytammik
Autodesk
Autodesk
Accepted solution

Maybe you have set read-only transaction mode. Maybe your document is read-only. Maybe some other command is blocking something. Can you modify your document manually through the user interface?

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder