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

How to get AecWallCustomGeometryBody from AcDb3dSolid?

2 REPLIES 2
Reply
Message 1 of 3
sniMD547
305 Views, 2 Replies

How to get AecWallCustomGeometryBody from AcDb3dSolid?

Hi everybody,

I have a problem with AecWallCustomGeometry. I want to add a AcDb3dSolid to
a wall, by using addCustomGeometryComponent. For that I need an AecWallCustomGeometryBody.

 

How can I get the Body from an AcDb3dSolid object to store it in an AecWallCustomGeometryBody?

 

Thanks in advance

 

2 REPLIES 2
Message 2 of 3
A_Eibel
in reply to: sniMD547

HI

 

you can use an instance of AecModelerBody to retrieve the body auf a solid.

 

AecModelerBody Body(pSolid);
Body* pBody = Body.getAModelerBody();

 

Message 3 of 3
sniMD547
in reply to: A_Eibel

Thanks,

 

your solution worked. I get a pointer to the Body object.

But when I add it as a geometry component to my wall the wall is not replaced by the solid, which is the objective.

Everything compiles fine and the ErrorStatus is always eOk. Do I need to update the wall representation or something like that?

 

Here is my code snippet:

 

AecWallCustomGeometryBody* pCustomGeom = new AecWallCustomGeometryBody;

pCustomGeom->setComponentId(0);

pCustomGeom->setOperationType(AecWallCustomGeometry::kReplace);

 

AecModelerBody solidBody(pSolid);

Body* pBody = solidBody.getAModelerBody();

 

pCustomGeom->setBody(*pBody);

 

pWall->addCustomGeometryComponent(pCustomGeom);

 

pSpace->appendAcDbEntity(pWall);

 

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

Post to forums  

Autodesk Design & Make Report

”Boost