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

Associative array

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
marioriva
1244 Views, 4 Replies

Associative array

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

4 REPLIES 4
Message 2 of 5
marioriva
in reply to: marioriva

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

Message 3 of 5
Balaji_Ram
in reply to: marioriva

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

Message 4 of 5
marioriva
in reply to: Balaji_Ram

Thank you.
Regards,

Mario
Message 5 of 5
haydee3
in reply to: marioriva

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.

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

Post to forums  

Autodesk Design & Make Report

”Boost