Associative array

Associative array

Anonymous
Not applicable
1,979 Views
4 Replies
Message 1 of 5

Associative array

Anonymous
Not applicable

Good morning,

 

I need to use an associative array (AcDbAssocArrayRectangularParameters and AcDbAssocArrayBodyAction) in objectArx 2012 to create rectangular array from a block.

I found an example in c# (newsampleapisAPI) and I tryed to search sample in ObjectArx c++ but I didn't find it. Do you know where can I find a sample?

Thank you,

 

Mario

0 Likes
Accepted solutions (1)
1,980 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

I've done in this way:

 

AcDbAssocArrayRectangularParameters *t=NULL;
    t=new AcDbAssocArrayRectangularParameters(spazioCol,spazioRig,spazioLiv,numCol,numRig,numLev,altezza,ang);
    AcDbFaceRef *pFace=NULL;
    t->setAxesAngle(ang);
    t->setAxisDirection(direzione);
    t->setBasePlane(puntoBase,normale,pFace);
   
    AcDbVertexRef basePoint(puntoBase);
    AcDbObjectId arrayId;
    AcDbObjectId actionBodyId;
    
    Acad::ErrorStatus es;
    es=AcDbAssocArrayActionBody::createInstance(sourceEntites,
                        basePoint,
                        t,
                        arrayId,
                        actionBodyId);

 

It works, I hope it is helpful but I don't know if it's the best, the most beatiful and the fastest way.

Bye,

 

Mario

0 Likes
Message 3 of 5

Balaji_Ram
Alumni
Alumni
Accepted solution

Hi Mario,

I have attached a C++ and .Net sample project that demonstrates the creation of associative arrays. These sample projects were created by my colleague Philippe Leefsma.



Balaji
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 4 of 5

Anonymous
Not applicable
Thank you.
Regards,

Mario
0 Likes
Message 5 of 5

Anonymous
Not applicable

hi, I'm working with associative arrays but in two different computers, in my laptop autocad ask me about associative or not, in my school computer it just decide itself and dont allow me to type even Y or N. Could you help me to set it?, I remember there is a command for that porpouse but I can find it anymore, please help.

0 Likes