I want to select objectId that area only available in particular layer state. that mean deselect hidden objects ID from current docuemnt in Civil 3d using c#.

I want to select objectId that area only available in particular layer state. that mean deselect hidden objects ID from current docuemnt in Civil 3d using c#.

swarali_kulkarni4KMYK
Alumni Alumni
220 Views
1 Reply
Message 1 of 2

I want to select objectId that area only available in particular layer state. that mean deselect hidden objects ID from current docuemnt in Civil 3d using c#.

swarali_kulkarni4KMYK
Alumni
Alumni

Any one has any idea or already know can post here.

 

Thanks in advance.

0 Likes
221 Views
1 Reply
Reply (1)
Message 2 of 2

shubhamraut221195
Enthusiast
Enthusiast

How about if we get all layer names in layerstate & select objects which are on those layers only? Maybe following block of code will help you. It reads all the layer names in layerstate 'TEST1" and select objects which are on those layers.

            ArrayList list = acLyrStMan.GetLayerStateLayers("TEST1", false);
            TypedValue[] typedValues = new TypedValue[list.Count];
            for(int i = 0; i < list.Count; i++)
            {
                typedValues[i] = new TypedValue((int)DxfCode.LayerName, list[i]);
            }
            SelectionFilter filter = new SelectionFilter(typedValues);
            PromptSelectionResult ids = ed.SelectAll(filter);
0 Likes