walkinside / sdk

Develop powerful desktop and web applications on top of Walkinside 3D engine
4 stars 4 forks source link

CAD Search box #44

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hi,

How to insert text in CAD search text box for searching object using c#? cad search box

Thanks

kveretennicov commented 6 years ago

Viewer SDK does not provide direct access to this text box (or to this window). There might be another way to achieve what you need, what is it exactly?

dkOogway commented 6 years ago

Idea is to search branch without manually enter value in CAD search option. Example., Insert the value using the code (i.e., Another application or browser)

dkOogway commented 6 years ago

Hi, we could use the below one to search the object in Walkinside project.

var branches = viewer.ProjectManager.CurrentProject.BranchManager.GetBranchesByNameFragmentAndKind(KKSInput, VRBranchKind.Cad);
            if (branches.Count() != 0)
            {
                foreach (IVRBranch branch in branches)
                {
                    string branchName = branch.Name.Replace("/", "");
                    if (branchName == KKSInput)
                    {
                        //Object could be searched
                    }
                    branchVal = branchVal + 1;
                }
            }

Thanks Dinesh

dkOogway commented 6 years ago

Please close this issue. Thanks