Autodesk Design Review
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to programmat ically select objects
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi!
Can't figure out how to programmatically select a group of objects in a ECompositeViewer so they will be highlighted somehow? Or maybe i can somehow colorize them just how TRANSPARENT command works?
Re: How to programmat ically select objects
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I would like to know how to do this too. Any suggestions autodesk admins?
I think it would also be very useful to get all the code examples that are embedded within the windows .chm help file up on a web page somewhere. Copying code out of the windows help viewer is a right pain and loses all formatting.
Cheers
Re: How to programmat ically select objects
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I got this working in javascript with help from the following article:
http://dwf.blogs.com/beyond_the_paper/dwf_programm
You can also control the selection set programmatically. First call IAdContent::CreateUserCollection to return an empty IAdUserCollection. You can then add to it the IAdObject interfaces of those objects you want selected. Once complete, you can “set” the IAdContent:
bjects(ObjectType:
elected) property to your collection to effect the desired selection."
I translated this to the following Javascript:
var MyCollection = ECompViewer.Section.Content.CreateUserCollection()
MyCollection.AddItem(objectYouWantToSelect);
ECompViewer.Section.Content.Objects(1) = UserCollection;
//Replace objectYouWantToSelect with a reference to your object
//The API uses Magic numbers 1 = selected

