• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

problem with use of osmode

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I have a problem with the use of the "osmode" variable, this string of code modifies a string, if I execute it with a close "zoom" works perfectly if, instead, the "zoom" is along the strings overlap, in short it does not work well.
evidently "osmode" is not set correctly.
Code:
(Setvar "osmode" 0)
(setq pos15 (- (strlen txt1) 69)
(right setq (substr txt1 (+ pos15 10) 59))
(setq right1 (strcat right "@" point))
(setq cx (right substr 37 11)
(setq cy (substr right 49 11)

(setq cxx (+ (atof cx) 0.50)
(setq cyyy (+ (atof cy) 0.50)
(setq address (strcat (rtos cxx) "," (rtos cyy)))
(command "_erase" address")
(command "_mtext" address "_j" "_bl" "_w" 50 (strcat name quote "{\\h0.01x;" right1 "}") "")
How do I set it up to avoid inconvenience?
Thank you.
 
with the setvar osmode 0 in practice disable the osnap and this prevents that in the phase of insertion autocad can "interpret" some point because it intercepts a snap.
from my point of view the command is correct.
probably the problem is due to something else, in the code.
If it was a real limit, zoom in in the lisp, so much the coordinates you have
only I find "particular" building coordinates (address) through a strcat, normally it is done by cons or list
 
thanks crystal,
I don't understand how this can happen.
may be due to the fact that the cancellation of the previous string via "the address" is not particularly effective, it would be better to perform it by directly identifying the item to be deleted.
should not be difficult since they select it but, until now I have not yet found the way to do it (sssget? ).
Do you have an idea about it?
Thank you.
 
(car (entsel)) returns the name of the object, asking you to select it
(entget (car (entsel))) returns the entire entity, including its characteristics (type of entity, color, layer, insertion points, text value etc)
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top