Link to home
Start Free TrialLog in
Avatar of Amitava_Mukherjee
Amitava_MukherjeeFlag for India

asked on

Looping through TypedValue array by C# in AutoCad

I have an arraylist named "Handles" with some handles of autocad entities. Now I want to select those entities from AutoCad. How it is possible?

I am trying the following code for SelectionFilter. But probably for loop is not allowed in TypedValue array. It is giving error. Any solution?

Thanx
TypedValue[] tvs = new TypedValue[]{
                new TypedValue((int)DxfCode.Operator, "<OR"),
                for(int i=0;i<Handles.Count;i++)
                {
                    string="";
                }
                new TypedValue((int)DxfCode.Operator,"OR>")
            };

Open in new window

Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

this:

for(int i=0;i<Handles.Count;i++)
                {
                    string="";
                }

only serves to assign the valie "" to a variable named string.  That has nothing to do with the array Handles

perhaps you meant

for(int i=0;i<Handles.Count;i++)
                {
                    string="";
                }


AW
perhaps you meant:

for(int i=0;i<Handles.Count;i++)
                {
                    Hadles[i].string="";
                }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Arthur_Wood
Arthur_Wood
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Amitava_Mukherjee

ASKER

thanx