Selection with SSGET "_F with inverted order
Dear Sir / Madam,
I am trying to solve a likely incompatibility between Bricscad and Autocad in the selection by (SSGET "_F" ....)
To facilitate the understanding of the problem, I created a routine just as an example: I drew 4 vertical lines manually and the routine needs to delete the lines from left to right. The lines will be selected using (SSGET "_F" list-pt), where the variable list-pt contains the points that cross the lines and are ordered from left to right.
When I run this same routine with the same DWG in Autocad, the order of the selected lines is correct (from left to right), while in Bricscad is from right to left.
I know I can test the platform and then decide with "IF" which order to use. But I want a global solution, without having to test the platform, as there are several routines with this selection process.
I would like to know if anyone has had this problem or I'm missing some details.
Thank you
Ney Paula
(DEFUN C:ORDER-SEL ()
(setq LIST_PT (list '(-1 1 0) '(1 1 0)))
(setq SEL_LINES (ssget "_F" LIST_PT))
(setq CONTADOR 0)
(while (< CONTADOR (sslength SEL_LINES))
(setq LINHADAVEZ (ssname SEL_LINES CONTADOR))
(alert "A seguir vou deletar a linha na sequencia") (command "erase" LINHADAVEZ "")
(setq CONTADOR (+ CONTADOR 1))
)
)