This is a little more complicated because I don't know how to make a dynamic block in lisp.
But manually it is possible.
Steps:
Click on a LEVEL-OBJ block
with the right-click enter the block editor
Select the attribute and in the properties change LOCK POSITION to 'on'
Same for multiline
Choose the Flip setting by setting a vertical axis from the tip of the arrow.
Then in Actions choose the flip action and select your parameter then all the objects (attribute included)
Exit the editor saving the changes
In the drawing do an ATTSYNC then a REGENALL
If done correctly you will be able to reverse your block with the little arrow
NB: DIMZIN at 0 is very good for keeping zeros at the beginning and end
(oldsnap is not a good choice: OSNAP is another variable, but if you declare it in local variable, is not important)
Welcome in the forum, Kvlar!
Do you intend to select several lines, and the program to insert blocks in the midpoints?
Can you *show* us what do you need? And also the Lisp we are talking about...
@Nikon
If you want to correlate the precision of the LEVEL-REF block, just change at the line 350
(cons 1 (rtos 0.0 2 2)) -> (cons 1 (rtos 0.0 2 3))
Be carrefull to the value of the DIMZIN variable which can influence the display of leading or trailing zeros.
In complex linetypes with text, the rotation field of the text used to have two alternatives, i.e. R=value and A=value. The R= signifies relative rotation to the line direction and A= signifies absolute rotation with respect to the origin. If both fields are not specified, the rotation defaults to R=0. As your linetype definition includes the A=0 field, then all your old drawings should have had all the characters aligned to North. Perhaps you only had horizontal lines where the effect would not be noticed?
The U=0 field is not backwards compatible with version 2000 and produces an error, as you have noticed. The R=0 should be compatible with both versions, but the lines would have to be drawn in the correct direction for text to be in a readable alignment. The A=0 field should also be compatible with both versions. I do not have the latest version so I cannot check that.
Your list is
(setq lst
'(
("1NPT" (274.153 159.462 0.0))
("2NPT" (289.385 162.882 0.0))
("SP" (296.889 154.795 0.0))
("4NPT" (270.005 143.501 0.0))
("8NPT" (293.189 146.368 0.0))
("9NPT" (312.465 145.292 0.0))
("5NPT" (282.932 131.402 0.0))
("12NPT" (272.478 120.102 0.0))
("11NPT" (255.807 122.674 0.0))
("10NPT" (236.431 127.388 0.0))
("3NPT" (244.494 141.269 0.0))
)
)
When you use (mapcar '(lambda (x) ..... ) lst)
x becomes each element in the list
So for example for the first element x becomes ("1NPT" (274.153 159.462 0.0))
which returns for (car x), we obtain "1NPT" which is the 1st element of the list.
with (cdr x) we obtain the list minus the 1st element i.e.((274.153 159.462 0.0))
car and cdr are the basis for list manipulation in lisp.
with (car (cdr x)) that we can write (cadr x) we will obtain (274.153 159.462 0.0)
with (car (car (cdr x))) that we can write (caadr x) we will therefore obtain 274.153
with (cdr (car (cdr x))) that we can write (cdadr x) we obtain (159.462 0.0)
with (car (cdr (car (cdr x)))) that we can write (cadadr x) we obtain 159.462
The writing nesting level can only be done on 4 levels
If for example you also wanted the z of the point you would have to do:
(car (cdr (cdr (car (cdr x))))) that it would be necessary to write (car (cddadr x)) to obtain 0.0
If only one entity at a time, you can add a Has-Property 'Area check.
(while (setq obj (vlax-ename->vla-object (car (entsel "Pick obj for area "))))
(setq a (vlax-get obj 'Area))
(setq lay (vlax-get obj 'layer))
(alert (strcat "The Area is " (rtos a 2 2) " on layer " lay))
)
Have no idea why not working had a look at my "W" only difference is it uses1 decimal place, but I am not running 2024.
A,20,-5.08,["W",STANDARD,S=1.8,R=0.0,X=-1.8,Y=-0.9],-3
Yes can do Water24 in same lin file, but that is not really the answer to why not working.
It's simple just freeze layers rather than turning them off to avoid that issue.
Objects on layers that are turned off are not only processed by Zoom Extents but slow down AutoCAD as it has to process more objects than you're actually working on.
Sorry Lee i dont have yet any code on it:lol: perhaps if you teach me how to start Lisp routes( i'm most willing to learn on creating Lisp routes) basically i just only learning on other codes that i got just edit and add by trial and error until it will work, no books or manual to guide im also one of the Lisp route user only,