Home > Software engineering >  ObjectArx combining MFC in the secondary development of CAD
ObjectArx combining MFC in the secondary development of CAD

Time:09-22


Since defines a command "AddThickSolidLine", in the executable program when the program is not in accordance with the order, every time is to display the dialog box first, then perform cad on the line, text output, consult everybody what's the problem? Thank you
The static void CreateTKAddThickSolidLine (void)
{
//Add your code for the command CreateTK. AddThickSolidLine here
AcGePoint3d pt0Start (25, 5, 0);
AcGePoint3d pt0End (204, 5, 0);
AcDbObjectId lineId;
LineId=CCreateTuKuang: : CreateLine (pt0Start pt0End);
CmodifyEnt: : ChangeLinetype (lineId, _T (" heavy line "));

//to prevent the resource conflicts
CAcModuleResourceOverride resOverride;

CWELCOME * MenuDlg=new CWELCOME ();//display the main dialog
MenuDlg - & gt; Create (IDD_DIALOG3);
MenuDlg - & gt; ShowWindow (SW_SHOW);
}

CodePudding user response:

In VBA for AutoCAD?

CodePudding user response:

reference 1st floor zhao4zhong1 response:
in VBA for AutoCAD?
Vc005

CodePudding user response:

May be this reason, the drawing function and not directly to perform drawing operations, the pop-up dialog box when the program is interrupted, so showed no timely refresh
You can send a in this function PostMessage custom message come out to display the dialog box, and see if I can give time to line is displayed

CodePudding user response:

Try to draw after actrTransactionManager - & gt; FlushGraphics ();
  • Related