I use ObjectARX use MFC to write a few dialog, wrote some statements, want to send the results directly output to the CAD model space,
When I put the "cstrings outStr14;
OutStr14. The Format (_T (" % d "), m_Yb75_4DJZ1);
AcGePoint3d ptInsert;
PtInsert. Set (112, 257, 0).
CCreateTuKuang: : Create1MText (ptInsert outStr14);" In acrxEntryPoint. CPP, there is no problem, can be normal output calculation results,
And when I put the "cstrings outStr14;
OutStr14. The Format (_T (" % d "), m_Yb75_4DJZ1);
AcGePoint3d ptInsert;
PtInsert. Set (112, 257, 0).
CCreateTuKuang: : Create1MText (ptInsert outStr14);" Into the void CWELCOME: : OnYb754 (), the program debugging, no mistakes, when run CAD loader disruptions, the system shows "acad tools. Exe of 0 x6458bd80 place the most possible exceptions: 0 xc0000005: while reading position 0 x00000004 access conflict"
"May be incorrect or missing, the framework of the following was not acdb17. DLL loading symbols", the location of the error in the "pBlockTable - & gt; close();
PBlockTableRecord - & gt; close();
PEnt - & gt; Close ();"
AcDbObjectId CCreateTuKuang: : CreateMText (const AcGePoint3d & amp; PtInsert, const ACHAR * text, AcDbObjectId style, double height, double width)
{
AcDbMText * pMText=new AcDbMText ();
//set multiline text feature
PMText - & gt; SetTextStyle (style);
PMText - & gt; SetContents (text);
PMText - & gt; SetLocation (ptInsert);
PMText - & gt; SetTextHeight (height);
PMText - & gt; SetWidth (width);
PMText - & gt; SetAttachment (AcDbMText: : kTopMid);
Return CCreateTuKuang: : PostToModelSpace (pMText);
}
AcDbObjectId CCreateTuKuang: : Create1MText (const AcGePoint3d & amp; PtInsert, const ACHAR * text, AcDbObjectId style, double height, double width)
{
AcDbMText * pMText=new AcDbMText ();
//set multiline text feature
PMText - & gt; SetTextStyle (style);
PMText - & gt; SetContents (text);
PMText - & gt; SetLocation (ptInsert);
PMText - & gt; SetTextHeight (height);
PMText - & gt; SetWidth (width);
PMText - & gt; SetAttachment (AcDbMText: : kTopMid);
Return CCreateTuKuang: : PostToModelSpace (pMText);
}
Void CWELCOME: : OnYb754 ()
{
//TODO: add the command handler code
//to prevent the resource conflicts
CAcModuleResourceOverride resOverride;
CENTERYB75TJNUM Enteryb75TjNumDlg;
If (Enteryb75TjNumDlg DoModal ()==IDOK)
{
M_Yb75_TjNum=Enteryb75TjNumDlg. M_Yb75_TjNum;
}
DJZ ();//a custom function
Cstrings outStr14;
OutStr14. The Format (_T (" % d "), m_Yb75_4DJZ1);
AcGePoint3d ptInsert;
PtInsert. Set (112, 257, 0).
CCreateTuKuang: : Create1MText (ptInsert outStr14);
}
CodePudding user response:
Collapsed in the pop-up dialog box, press the corresponding button to enter debugging press Alt + 7 key to view the Call Stack, namely "the Call Stack" from the inside to the following out of from the inner to outer function Call history, double-click a row to the cursor to the Call of the source code or assembly instruction, don't understand when double click on the next line, until we can read ,CodePudding user response:
Problems in CCreateTuKuang: : PostToModelSpace (pMText); insideCodePudding user response: