Community
Buen día, tengo el siguiente error en mi siguiente Script, en Sharp DEVELOP
les dejo el codigo para que me puedan orientar con la solución
public void C4_M2_SeleccionElementos()
{
UIDocument uidoc = this.ActiveUIDocument;
Document doc = uidoc.Document;
StringBuilder sbuilder = new StringBuilder();
Reference ref_pickobject_element = uidoc.Selection.PickObject(ObjectType.Element,"SELECIONA UN ELEMENTO");
Element elemento_pickobject_element = doc.GetElement(ref_pickobject_element);
sbuilder.AppendLine("PICKOBJECT ELEMENTO: "+elemento_pickobject_element.Name);
sbuilder.AppendLine();
IList<Reference> refs_pickobject = uidoc.Selection.PickObjects(ObjectType.Element,"SELECCIONA VARIOS OBJETOS");
sbuilder.AppendLine("PICKOBJECTS");
foreach (Reference ref_elem in refs_pickobject)
{
Element e_seleccionado = doc.GetElement(ref_elem);
sbuilder.AppendLine(e_seleccionado.Name);
}
sbuilder.AppendLine();
sbuilder.AppendLine("PICKED BY RECTANGLE");
List<Element> lista_pickedbyrectangle = uidoc.Selection.PickElementsByRectangle("SELECCIONA CON UN RECTANGULO").ToList();//TRANSFORMANDO EN LISTA
foreach (Element elemento in lista_pickedbyrectangle)
{
sbuilder.AppendLine(elemento.Name);
}
TaskDialog.Show("Innova3D&C",sbuilder.ToString());
}
Hola.
Eso sucede cuando presionas ESC durante la ejecución del comando. Tienes que crear un bloque try/catch para gestionar la excepción.
Saludos.
claro, al colocar el Try el Catch ya no me bota la ventana de error, pero no soluciona mi problema.
¿quiza se deba a eso?
Eso que te sale, ya es un problema diferente.
Saludos.
Can't find what you're looking for? Ask the community or share your knowledge.