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

Selection Sets

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
208 Views, 3 Replies

Selection Sets

Hi.

I am a beginner at ObjectARX, so please bear with me if my question seems
dumb. When I select a bunch of objects, I get the ads_name back. Now then,
when converting this ads_name to resbuf, do I do that once, and then
traverse through the list of resbufs or do I do that for every ads_name (if
there are multiple), bumping the name pointer every time. I guess a shorter
way to ask this question is "does ads_name variable have a member field to
the effect of rbnext in resbuf, which would allow it to build a list of
ads_names?". So after I select multiple entities which case to I have
(below: A or B)?

note that -> in this case is used as a linked list pointer, not a subobject
data access.

A ads_name ->ads_name->ads_name->NULL and each ads_name converted
to its own resbuf list or

B ads_name standalone, where it's converted to multiple resbuf lists,
where the final node describing object 1 is linked to the header node
describing object 2 and so on?

C Something I haven't considered?

Thank you.
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: Anonymous

Alex/parahumaniod - How about posting under your real name?

An ads_name is not a resbuf. You would use the acedSSName()
function to get the ads_names of each entity in a selection
set. You could also use acdbGetObjectId() to get the object ids
of those ads_names.

ads_name pickset;
ads_name entity;
long sslen;

// Get the length of the selection set:

acedSSLength(pickset, &sslen);

// iterate over the entities in the selection
// set and process each.

for( long i = 0; i < sslen; i++)
if( acedSSName(pickset, i, entity) == RTNORM )
{
// here 'entity' is assigned to the
// ads_name of each entity in the selection set
// so do what you want with it.
}


"Alex_ARX" wrote in message
news:F6DF6D3E416371F25E816533A470F63E@in.WebX.maYIadrTaRb...
> Hi.
>
> I am a beginner at ObjectARX, so please bear with me if my question seems
> dumb. When I select a bunch of objects, I get the ads_name back. Now
then,
> when converting this ads_name to resbuf, do I do that once, and then
> traverse through the list of resbufs or do I do that for every ads_name
(if
> there are multiple), bumping the name pointer every time. I guess a
shorter
> way to ask this question is "does ads_name variable have a member field to
> the effect of rbnext in resbuf, which would allow it to build a list of
> ads_names?". So after I select multiple entities which case to I have
> (below: A or B)?
>
> note that -> in this case is used as a linked list pointer, not a
subobject
> data access.
>
> A ads_name ->ads_name->ads_name->NULL and each ads_name converted
> to its own resbuf list or
>
> B ads_name standalone, where it's converted to multiple resbuf
lists,
> where the final node describing object 1 is linked to the header node
> describing object 2 and so on?
>
> C Something I haven't considered?
>
> Thank you.
>
>
Message 3 of 4
Anonymous
in reply to: Anonymous

Thanks for the advice.


Tony Tanzillo wrote in message
news:C1D864E0F58AA3B16DEA82F07AAE1B42@in.WebX.maYIadrTaRb...
> Alex/parahumaniod - How about posting under your real name?
>
> An ads_name is not a resbuf. You would use the acedSSName()
> function to get the ads_names of each entity in a selection
> set. You could also use acdbGetObjectId() to get the object ids
> of those ads_names.
>
> ads_name pickset;
> ads_name entity;
> long sslen;
>
> // Get the length of the selection set:
>
> acedSSLength(pickset, &sslen);
>
> // iterate over the entities in the selection
> // set and process each.
>
> for( long i = 0; i < sslen; i++)
> if( acedSSName(pickset, i, entity) == RTNORM )
> {
> // here 'entity' is assigned to the
> // ads_name of each entity in the selection set
> // so do what you want with it.
> }
>
>
> "Alex_ARX" wrote in message
> news:F6DF6D3E416371F25E816533A470F63E@in.WebX.maYIadrTaRb...
> > Hi.
> >
> > I am a beginner at ObjectARX, so please bear with me if my question
seems
> > dumb. When I select a bunch of objects, I get the ads_name back. Now
> then,
> > when converting this ads_name to resbuf, do I do that once, and then
> > traverse through the list of resbufs or do I do that for every ads_name
> (if
> > there are multiple), bumping the name pointer every time. I guess a
> shorter
> > way to ask this question is "does ads_name variable have a member field
to
> > the effect of rbnext in resbuf, which would allow it to build a list of
> > ads_names?". So after I select multiple entities which case to I have
> > (below: A or B)?
> >
> > note that -> in this case is used as a linked list pointer, not a
> subobject
> > data access.
> >
> > A ads_name ->ads_name->ads_name->NULL and each ads_name
converted
> > to its own resbuf list or
> >
> > B ads_name standalone, where it's converted to multiple resbuf
> lists,
> > where the final node describing object 1 is linked to the header node
> > describing object 2 and so on?
> >
> > C Something I haven't considered?
> >
> > Thank you.
> >
> >
>
>
Message 4 of 4
Anonymous
in reply to: Anonymous

Tony,

Very good point. There is little satisfaction in helping the anonymous
posters
with highly technical responses. Good on Alex for taking the hint.

Regards Gary.


"Tony Tanzillo" wrote in message
news:C1D864E0F58AA3B16DEA82F07AAE1B42@in.WebX.maYIadrTaRb...
> Alex/parahumaniod - How about posting under your real name?

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

Post to forums  

Autodesk Design & Make Report

”Boost