Dear Sirs
After upgrading AutoCad to version 2022 I have encountered problem with drawing closed polylines from scr files. Namely the properly formatted scripts results in drawing lines that are missing nodes. What is interesting, if I copy the command from open scr file and paste it directly to AutoCad command line, the polyline is correctly drawn. The problem is that I am drawing lines composed of so many segments, the command line is not accepting them.
I obey the following rules:
- each line in script is terminated with CRLF (\r\n)
- the last line is empty
- the whitespace serves as pressing of the Enter
Below are two lines from very simple test script. As a result one should see closed polyline rectangle with triangle at the top, whereas after running script I see triangle.
CLAYER 0
_PLINE 31500.0,25500.0 32500.0,25500.0 32500.0,28500.0 32000.0,29000.0 31500.0,28500.0 _CLOSE
Whould you be so kind and give me some clue about what I am doing wrong.
Kind regards
Cuma Tyszkiewicz
Solved! Go to Solution.
Solved by ВeekeeCZ. Go to Solution.
Regards @cuma.tyszkiewicz
I tried the lines that you show in the 2022 version, and this is what it draws. Do not forget to enter "enter" so that the cursor remains on the blank line.
Carlos Calderon G
>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
@cuma.tyszkiewicz wrote:
... one should see closed polyline rectangle with triangle at the top, whereas after running script I see triangle.
....
If this is the kind of triangle you get:
that is definitely the effect of having running Object Snap modes on, presumably including ENDpoint, and being Zoomed out far enough that the Osnap aperture "reaches" previous endpoints to snap to them. If you are Zoomed to just the right [or just the wrong?] degree, you could get this instead:
It should work if you Zoom in closer, even with Osnap running, as long as there isn't other stuff in the area it could snap to, but it's far better to ensure running Osnap is off, whether or not you build it into the Script.
If what you are seeing is the triangle part at the top of the intended result, something else is going on.
Hello
Many, many thanks for help. I thought I would wither on copy paste. Now scripting works perfectly for me.
Greetings!
Cuma
Can't find what you're looking for? Ask the community or share your knowledge.