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
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...
Make sure you're using documentation that matches the version of ObjectARX SDK that you're using.