Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

drawing polyline from scr file - missing nodes

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
cuma.tyszkiewicz
218 Views, 4 Replies

drawing polyline from scr file - missing nodes

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

 

4 REPLIES 4
Message 2 of 5

Running OSNAPs? 

Use this setting and try again

 

BeekeeCZ_0-1673455647811.png

 

Message 3 of 5

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.

 

calderg1000_0-1673461535218.png

 


Carlos Calderon G
EESignature
>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.

Message 4 of 5


@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:

Kent1Cooper_0-1673463193640.png

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:

Kent1Cooper_0-1673463558152.png

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.

Kent Cooper, AIA
Message 5 of 5

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.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report