Joseph
Guest
nel file "ai_utils.lsp" all'interno della cartella support di autocad ho trovato questa interessante osservazione che giro a voi:
integers in autolisp are 32-bit values. however, when integers
are transferred between autolisp and autocad, they are restricted
to 16-bit values (+32767 to -32768). (sslength) returns real
numbers when the number of entities exceeds 32767, and subsequent
use of a variable expected to contain an int that actually contains
a real causes those functions to fail ((ssname) for instance.)
this wrapper ensures that the returned number is an int.
(defun ai_sslength (ss)
(if ss
(fix (sslength ss))
0
)
)
integers in autolisp are 32-bit values. however, when integers
are transferred between autolisp and autocad, they are restricted
to 16-bit values (+32767 to -32768). (sslength) returns real
numbers when the number of entities exceeds 32767, and subsequent
use of a variable expected to contain an int that actually contains
a real causes those functions to fail ((ssname) for instance.)
this wrapper ensures that the returned number is an int.
(defun ai_sslength (ss)
(if ss
(fix (sslength ss))
0
)
)