.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SelectionSet from SelectionSet?

6 REPLIES 6
Reply
Message 1 of 7
MarkPendergraft
469 Views, 6 Replies

SelectionSet from SelectionSet?

Hi everybody.
Is there a way to build a selectionset that filters another selectionset. Maybe i'm going about this the wrong way.

basically i have created a command that either runs on the currently selected objects, or asks the user to select objects (if none were selected already).

now, the only thing that i can't figure out, is whether i can build a selectionset from the implied selectionset.

i can get the objects that were selected when the command was run, but i would like to filter the selectionset to only contain items that i want to use in the sub. I would like to turn this into a generalized function for all of my programs.

I have a workaround in place (if typeof ent is polyline then....)
And i don't want to use the COM interface.....cause i'm snobby like that. 🙂

if it can't be done, oh well, but i just thought i would ask.

Thanks guys.
6 REPLIES 6
Message 2 of 7

well, i ended up building an array, iterating through and filtering it. So, i guess i answered my own question. I still appreciate feedback of course, but this is the method i'm going to use, unless something better comes along.
Thanks.
Message 3 of 7
supec
in reply to: MarkPendergraft

Does anybody know solution? I have same problem, iteration isn't solution for me, I have way too much blocks in the drawing...

I want to apply selectionfilter (filter by name of block) or something on OBJECTID Array, which I have obtained by manual selection of blocks in drawing.
Message 4 of 7

I don't quite understand your issue. perhaps you could explain your situation in a little more detail.
Message 5 of 7
Anonymous
in reply to: MarkPendergraft

If you want to get all insertions of one or more
blocks, one way is to call GetBlockReferenceIds()
on the BlockTableRecord.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5741724@discussion.autodesk.com...
Does anybody know solution? I have same problem, iteration isn't solution for me, I have way too much blocks in the drawing...

I want to apply selectionfilter (filter by name of block) or something on OBJECTID Array, which I have obtained by manual selection of blocks in drawing.
Message 6 of 7
supec
in reply to: MarkPendergraft

For example:
There are 100 blocks named "stamp" in the drawing. this "stamp" looks like rectangle and each of them have bloks "blocksToFill" inside of it (within extents of it).
1. I prompt user to select SOME of these "stamps" and "blocksToFill" to load them into objectId[] - done by selectionfilter (filtering blocks only)
2. now I want to somehow get objectIdStamps[] from original objectId[] - how to do it???
I walked aroud the thing - I prompted a user to select a window, which I use later more times in:
PromptSelectionResult oAcadSelectionResultStamps = ed.SelectWindow(startPt,endPt,oAcadSelectionFilterStamps)
Message 7 of 7
Anonymous
in reply to: MarkPendergraft

A minor screw-up in the managed API was that the
SelectPrevious() method isn't overloaded to take a
selection filter to apply to the previous selection set.

That's possible using the native acedSSGet() and
LISP (ssget) functions, but was overlooked in the
managed wrapper API.

You will need to scan the array and pull out what you
need.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com

wrote in message news:5750239@discussion.autodesk.com...
For example:
There are 100 blocks named "stamp" in the drawing. this "stamp" looks like rectangle and each of them have bloks "blocksToFill" inside of it (within extents of it).
1. I prompt user to select SOME of these "stamps" and "blocksToFill" to load them into objectId[] - done by selectionfilter (filtering blocks only)
2. now I want to somehow get objectIdStamps[] from original objectId[] - how to do it???
I walked aroud the thing - I prompted a user to select a window, which I use later more times in:
PromptSelectionResult oAcadSelectionResultStamps = ed.SelectWindow(startPt,endPt,oAcadSelectionFilterStamps)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost