I think this will draw a line in arx, I haven't compiled it for a check...
AcDbDatabase *pCurrentDB; // pointer to hole current drawing database
AcGePoint3d stpt(0.0,0.0,0.0); //3d starting point
AcGePoint3d endpt(5.0,5.0,0.0);; //3d ending point
AcDbLine *acLine = new AcDbLine(stpt, endpt); // create a new newline
pCurrentDB = acdbHostApplicationServices()->workingDatabase(); // set pointer to workling database
AcDbBlockTable *pBlockTable;
pCurrentDB->getBlockTable(pBlockTable, AcDb::kForRead); //get the block table
AcDbBlockTableRecord *pBlockTableRecord;
pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite); // get a blocktablerecord
pBlockTable->close();
AcDbObjectId lineId;
pBlockTableRecord->appendAcDbEntity(lineId, acLine); // Actually adds the line to the drawing
pBlockTableRecord->close();
acLine->close();