PeterT Posted October 15, 2009 Share Posted October 15, 2009 Is there any way to get the handle of a PIO in wall or a symbol in wall by its location on the drawing? If I go to the location of a placed symbol or PIO in a wall and GetType of the object at that location it returns type 68 (wall) and not the type of the inserted item. Do I have to HUngroup the wall in order to get to the object? I was hoping to use SetParent to remove the object from the wall without having to explode the wall, but I cannot seem to get to the inserted object in the first place. Am I missing something simple here? Quote Link to comment
Pat Stanford Posted October 15, 2009 Share Posted October 15, 2009 Check the VS Reference for GetPickObjectInfo. This will get you a second handle to the object inside the wall. Quote Link to comment
Miguel Barrera Posted October 16, 2009 Share Posted October 16, 2009 GetPickObjectInfo may work if there is only one symbol in the wall. If I remember well, walls are group objects that contain a 2D group object, a 3D group object, and the symbols inside the wall. Try FInGroup to get an object handle inside the wall and then iterate with NextObj until you find the symbol/pio type object. Quote Link to comment
PeterT Posted October 16, 2009 Author Share Posted October 16, 2009 If I use GetPickObjectInfo, the other issue I will have to resolve is actually obtaining the coordinate location. I am needing this inside of a running subroutine, and all I have is a handle to the wall and a handle to a line that crosses the wall where the symbol is inserted. So I cannot use GetPt, and will have to find the intersection of the wall and line. I also have other cases where the line crosses the inserted symbol but not the wall, for example where the line is parallel to the wall but crosses an open door swing. If I GetType of the object here it still returns type 68 (wall), but I am not sure if GetPickObjectInfo will find the sub selectable object if it does not find the wall object at that point. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.