DWF Viewer

Reply
Member
LRizo
Posts: 4
Registered: ‎09-26-2009
Message 1 of 2 (1,895 Views)

Finding An Object with the ID Property using the Active X Control

1895 Views, 1 Replies
09-22-2010 01:41 PM

I've got a 3D DWF File that I'm trying to isolate an object in. But the only information I know about the object is its UID value, which matched the Object's ID property. Note that ObjectContent2.get_Obect does not work for me unless I can somehow convert the UID value to that object id value, which is different.

 

Right now I've got a basic loop that finds the object, which looks something like this:

                      foreach (IAdObject2 MyObject in MyObjects)
               {
                    foreach (IAdProperty MyObjectProperty in MyObject.Properties)
                    {
                        if (MyObjectProperty.Name == "Id" && MyObjectProperty.Value == RevitDWFGUIDstr)
                        {                            
                            MyObjectsNamedCollection.AddNamedItem(MyObject, RevitDWFGUIDstr);
                            break;
                        }
                    }
                    if (MyObjectsNamedCollection.Count > 0)
                    {
                        break;
                    }
                }

 

For big models, this nested loop is taking a while. Is there anyway to make this process quicker? I am only looking for 1 kind of object (Doors). Is there someway that I could filter down my objects collection to consist of only Doors? Or any other possible method for trimming down the number of objects that I'm looking at?

 

Many thanks.

Employee
herbert.he
Posts: 338
Registered: ‎03-05-2008
Message 2 of 2 (1,857 Views)

Re: Finding An Object with the ID Property using the Active X Control

09-27-2010 08:07 PM in reply to: LRizo

Thank you for your question.

 

Autodesk Design Review currently does not has other APIs supporting your this requirement.

 

Please let me know if I can be of any further assistance.



Herbert He
SW Engineer
PSEB-GE- ACRD PSEB
Autodesk, Inc.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community