algorithmic modeling for Rhino


The Lyrebird capabilities are essential for me, thanks so much. Now I´m trying to speed automated proccesses by simply omitting the task dialog accepting the new geometry in a debugged environment. Just to receive new geometry and accept it automatically. 

I know my problem is here, but i´ve no idea about C# 

TaskDialog dlg = new TaskDialog("Warning") { MainInstruction = "Incoming Data" };
RevitObject existingObj1 = incomingObjs[0];
bool profileWarning1 = (existingObj1.CategoryId == -2000011 && existingObj1.Curves.Count > 1) || existingObj1.CategoryId == -2000032 || existingObj1.CategoryId == -2000035;
if (existing == null || existing.Count == 0)
dlg.MainContent = "Data is being sent to Revit from another application using Lyrebird." +
" This data will be used to create " + incomingObjs.Count.ToString(CultureInfo.InvariantCulture) + " elements. How would you like to proceed?";
dlg.AddCommandLink(TaskDialogCommandLinkId.CommandLink1, "Create new elements");
dlg.AddCommandLink(TaskDialogCommandLinkId.CommandLink2, "Cancel");

TaskDialogResult result1 = dlg.Show();
if (result1 == TaskDialogResult.CommandLink1)
// Create new
CreateObjects(incomingObjs, uiApp.ActiveUIDocument.Document, uniqueId, 0, nickName);
catch (Exception ex)
TaskDialog.Show("Error", ex.Message);

I don´t know either its not as simple as erasing code until "//Create new" or  if i´m going wrong compiling the project.

Thank for any help

Views: 232

Replies to This Discussion

Hi again, 

just came to say it works fine, if some naive like me finds it useful.

My error was a bad setting of visual studio to compile the project.

Thanks anywere!






  • Add Photos
  • View All


  • Add Videos
  • View All

© 2022   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service