new_dialog position

new_dialog position

SAPER59
Advocate Advocate
403 Views
3 Replies
Message 1 of 4

new_dialog position

SAPER59
Advocate
Advocate

I can't position the dialog any more in the desired position working with (new_dialog ndiag #TROG_DCL "" #pdd200) and

(new_dialog ndiag #TROG_DCL "" #pdd200)

It always uses the center of the screen for new opened dialogs

Does something change in last AutoCAD versions or there's something to be set, to let it works as old versions.

 

Thanks

 

0 Likes
404 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant

We can't tell without seeing what is setting your variables, and whether they are of the correct types.  The syntax from Help:

(new_dialog dlgname dcl_id [action [screen-pt]])

The dlgname argument needs to be a string, dlg_id an integer, [action can be your ""], and screen-pt a point list.

Kent Cooper, AIA
0 Likes
Message 3 of 4

Sea-Haven
Mentor
Mentor

Thanks Kent tried it out. The offset looks like from top left corner, taking into account screen res values maybe.

 

(setq dcl_id (load_dialog fname))
(if (not (new_dialog "AHbutts" dcl_id "" (list 200 200)) )
(exit)
)

 

 

0 Likes
Message 4 of 4

paullimapa
Mentor
Mentor

FYI: My experience with why the dialog position not sticking to where last closed even when that's built into the code has to do with running the AutoCAD window on the 2nd monitor and not the first.  Then the dcl will always appear in the center of the 2nd monitor. If you were to move the AutoCAD window back to the primary monitor, then the dcl window position will properly save and will appear in that location when reopening.


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes