Hi,
My system is windows 7, Connect update2 and VS 2013
I have CellElement with ID = 1681447
One of cell components is element with ID= 1681548
Using class with ILocateCommandEvents I locate cell by clicking on component element (1681548) and then I am using CommandState.GetLocatedElement(false)
to retrieve info about component element
What I am getting in void Accept is totally wrong.
eleComponent.ParentID = 1681548 THIS IS NOT PARENT ID BUT COMPONENT ID !!!!!
eleComponent.ID = 1681559 THIS IS ID of ANOTHER COMPONENT ELEMENT IN THE CELL FAR AWAY FROM HITTING POINT
public void Accept(BCOM.Element Element, ref BCOM.Point3d Point, BCOM.View View) { BCOM.CellElement cell = Element.AsCellElement(); BCOM.Element eleComponent = appL.CommandState.GetLocatedElement(false); long idd = eleComponent.ParentID; long idd64 =eleComponent.ParentID; long idd_comp=eleComponent.ID; long idd64_comp = eleComponent.ID64; this.locateCellPlacedValue(cell, idd); }
This is why GetElementByID64 is returning wrong element.
Ant comments and explanations?