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

XLINE - setSecondPoint is not a member of AcDbXline

2 REPLIES 2
Reply
Message 1 of 3
ZK_BUDiKOM
316 Views, 2 Replies

XLINE - setSecondPoint is not a member of AcDbXline

In XLine Method (http://docs.autodesk.com/ACDMAC/2011/ENU/ObjectARX%20Reference/index.html?frmname=topic&frmfile=AcDb... is "setSecondPoint":

AcDbXline Methods
setSecondPoint - This is setSecondPoint, a member of class AcDbXline.
setUnitDir - Sets vec to be the unit direction vector of the xline.


AcDbXline::setSecondPoint Method
C++
ACDB_PORT Acad::ErrorStatus setSecondPoint(
AcGePoint3d const & pt
);
Description
This is setSecondPoint, a member of class AcDbXline.
Links
AcDbXline


Why I have an error??
"error C2039: 'setSecondPoint' : is not a member of 'AcDbXline'"

AcDbEntity* AddXline (const AcGePoint3d& firstPt, const AcGePoint3d& secondPt)
{
AcDbXline *pxline = new AcDbXline();
pxline->setBasePoint(firstPt);
pxline->setSecondPoint(secondPt);
(...)
}

How to recount AcGePoint3d& to AcGeVector3d?

AcGeVector3d vec;
vec.x=secondPt.y;
vec.y=secondPt.x;
vec.z=0;
ASSERT(vec);
pxline->setUnitDir(vec);
??

regards

2 REPLIES 2
Message 2 of 3
ZK_BUDiKOM
in reply to: ZK_BUDiKOM

Ok, I write:

 

AcDbXline *pxline = new AcDbXline();
pxline->setBasePoint(firstPt);
AcGeVector3d vec = (firstPt - secondPt).normalize();
pxline->setUnitDir(vec);
return pxline;

 

but don't understand, why setSecondPoint is still unavailable even though it is in the documentation...

Message 3 of 3
owenwengerd
in reply to: ZK_BUDiKOM

Make sure you're using documentation that matches the version of ObjectARX SDK that you're using.

--
Owen Wengerd
ManuSoft

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

Post to forums  

Autodesk Design & Make Report

”Boost