How to set the dogleg direction of a creating multileader permanently vertical?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear Pals,
I'm faced with a problem when creating a multileader with a vertical dogleg using the code below. when creating, the dogleg is vertical. But when you move dogleg to the leftside, its direction turns to horizontal unexpectly(I want it keeping vertical). Is there any points wrong with my codes? Please give a hand~ Much appreciate~
AcDbMLeader *pEnt=new AcDbMLeader();
AcGePoint3d ptStart(0,0,0);
AcGePoint3d ptEnd1(-30,-10,0);
AcGeVector3d vec(0,-1,0);
int i;
pEnt->setContentType(AcDbMLeaderStyle::kBlockContent);
pEnt->addLeader(i);
pEnt->addLeaderLine(ptStart,i);
pEnt->addLastVertex(i,ptEnd1);
pEnt->setDoglegLength(10);
pEnt->setDoglegDirection(i,vec);
pEnt->setBlockConnectionType(AcDbMLeaderStyle::kConnectBase);
////////////////////////////////////////////////////////////////
......Got the inserted content block and arrow block for the Mleader
/////////////////////////////////////////////////////////////////
pEnt->setArrowSymbolId(arrowDefId); // 'arrowDefId' inputs the ID of arrow block to be inserted
pEnt->setBlockContentId(blkDefId); // 'blkDefId' inputs the ID of content block to be inserted
PostToModelSpace(pEnt);
pEnt->close();