PickElementsByRectangle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good morning,
My name is Nicolás,
This is a code that i found in internet, this code is made in C# for selecting elements and get information of them, i modified a line of code to make this macro let me get information of pipes, but it doesn´t work, and don´t know why:
public void SeElInformation()
{
UIDocument uidoc = this.Application.ActiveUIDocument;
Document doc = uidoc.Document;
var informacion = "Los ids y los nombres de los elementos son : \n\n";
var referencias =uidoc.Selection.PickElementsByRectangle(ElementTypeGroup.PipeType);
foreach(var REF in referencias)
{
Element elem = uidoc.Document.GetElement(REF);
informacion += elem.Id + "," +elem.Name + "\n";
informacion += elem.Document.SiteLocation.Latitude + "," +elem.Name + "\n";
informacion += elem.Category.Material.MaterialClass;
informacion += elem.Parameters.Size;
}
TaskDialog.Show("informacion elemento" , informacion);
I attached 3 screenshots to explain detailed my problem.
I would like anybody could help me,
Thanks.
Developer Advocacy and Support +