Jump to content

SCR (Script) file to draw polyline.....


cadamrao

Recommended Posts

Hi

 

I have a some easting,northing coordinates;from that coordinates I need to draw a polyline by using SCR methods.I'm trying to run my scr command;but showing unknown some error in command line.Please help me.I will sending dwg and scr file for correction.

 

Thanks in Advance.

 

venki R

scr.scr

Boundary Line.dwg

Link to comment
Share on other sites

Check your scr file, at the end of lines 4,6 & 7 you have an extra space, autocad reads this as the enter command and so creates odd results.

Link to comment
Share on other sites

Yaa..now its working,only something straight line;but not my drawing (boundary line). please clarify it.

 

Thanks for spending time.

Link to comment
Share on other sites

as ReMark says, you have given the co-ordinates almost in a straight line. Did you mean to use absolute coordinates rather than relative ones? If so, replace the @ with a #

Link to comment
Share on other sites

Maybe if you gave us ALL the information we might be better able to assist you. Could you do that please? Otherwise this is going to get very frustrating quickly.

Link to comment
Share on other sites

What happens if you remove the extra character (@ or #) from the front of the line, and just leave the figures on each line?

 

_PLINE

22.0954,7.0898

24.4464,3.5113

30.3239,6.3703

27.7264,10.1761

31.0933,12.4671

32.6094,9.9539

36.3995,12.4066

;end of file

Link to comment
Share on other sites

Remove the ; end of file and just have it as a blank line you need the last line as blank so it acts a return ending pline for you

 

also add look at this with snap on screws up pline.

 

(setq oldsnap (getvar "osmode"))

Osmode 0

_PLINE

22.0954,7.0898

24.4464,3.5113

30.3239,6.3703

27.7264,10.1761

31.0933,12.4671

32.6094,9.9539

36.3995,12.4066

 

(setvar "osmode" oldsnap)

Link to comment
Share on other sites

  • 4 years later...

I have quite a similiar problem.

My script is supposed to draw two separate polyline and write four text but it does not.

Please look and see if you can pin down where I go wrong.

 

LAYER S 1-SURCHARGE-LEVEL  LINETYPE S CONTINUOUS  CELTSCALE 0.60 -OSNAP OFF
_PLINE 
-17.001,2.999
-17.001,12.264
-17.001,13.764
-17.001,22.764

TEXT J BC
-17.001,21.264
0.40 0
-17.001
TEXT J BC
-17.001,18.264
0.40 0
2.999
LAYER S 1-SURCHARGE-LEVEL  LINETYPE S CONTINUOUS  CELTSCALE 0.60 -OSNAP OFF
_PLINE 
-16.9,2.9
-16.9,12.264
-16.201,13.764
-16.201,22.764

TEXT J BC
-16.201,21.264
0.40 0
-16.900
TEXT J BC
-16.201,18.264
0.40 0
2.900
 

Thanks

Alfred

Link to comment
Share on other sites

You need to count the returns more you need to use a blank line or a space on end, blank line is more obvious, you are not completeing commands a enter is needed to exit.

 

Split layer and osnap can use osmode 0  but remember to set back to default

 

You are not ending pline command either a C or blank line.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...