Jump to content

script issue


cursedeye

Recommended Posts

My insert script always plots different results(some of the locations are off by a little bit, but not much, and every time is different depends on the mood of the computer:()... unless I manually paste them line by line which complete defeats the purpose of having a script.

 

Can anyone help please? here is what it looks like:

(command "-insert" "RK_112" "_S" 1 "11648,18562,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,18430,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,18562,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,18430,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18562,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18430,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18562,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18430,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18278,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18146,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18278,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,18146,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,18278,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,18146,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,18278,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,18146,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17994,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17862,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17994,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17862,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17994,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17862,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17994,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17862,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17710,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17578,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17710,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17578,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17710,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17578,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17710,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17578,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17426,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17294,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17426,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17294,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17426,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17294,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17426,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17294,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17142,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17010,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17142,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,17010,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17142,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17010,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17142,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,17010,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16858,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16726,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16858,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16726,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16858,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16726,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16858,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16726,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16574,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16442,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16574,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16442,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16574,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16442,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16574,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16442,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16290,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16158,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16290,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16158,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16290,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16158,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16290,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16158,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16006,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15874,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,16006,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15874,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16006,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15874,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,16006,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15874,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15722,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15590,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15722,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15590,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15722,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15590,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15722,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15590,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15438,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15306,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15438,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15306,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15438,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15306,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15438,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15306,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15154,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15022,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15154,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,15022,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15154,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15022,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15154,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,15022,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14870,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14738,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14870,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14738,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14870,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14738,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14870,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14738,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14586,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14454,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14586,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14454,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14586,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14454,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14586,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14454,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14302,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14170,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14302,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14170,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14302,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14170,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14302,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14170,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14018,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13886,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,14018,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13886,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14018,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13886,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,14018,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13886,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13734,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13602,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13734,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13602,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13734,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13602,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13734,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13602,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13450,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13318,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13450,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13318,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13450,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13318,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13450,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13318,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13166,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13034,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13166,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,13034,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13166,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13034,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13166,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,13034,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12882,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12750,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12882,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12750,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12882,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12750,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12882,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12750,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12598,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12466,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12598,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12466,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12598,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12466,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12598,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12466,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12314,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12182,0" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12314,130" 90)
(command "-insert" "RK_112" "_S" 1 "11648,12182,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12314,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12182,0" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12314,130" 90)
(command "-insert" "RK_112" "_S" 1 "11314,12182,130" 90)

Edited by cursedeye
change code format, add tag
Link to comment
Share on other sites

ok..

update: although every time it gives different results, the common issue is that the blocks that are off, although different ones every time, always sit on an edge or midpoint of others. So I turned off Object Snap and 3D Object Snap and it worked (at least none was off by too much…) and finished even faster than before…

 

But I can’t really tell if it really worked because 1, I’m not sure if that’s the real cause, 2. it’s impossible to check all the coordinates, since I have over 10k objects.

 

please help

Link to comment
Share on other sites

A couple of suggestions add a turn off snaps at start and chuck in a few zoom e Autocad can do some funny stuff if it cant see what its doing as in off screen.

 

Zoom E
(setq oldsnap (getvar "osmode"))
(setvar osmode 0)
command "insert"......
command "insert"......
command "insert"......
Zoom E 
command "insert"......
command "insert"......
command "insert"......
(setvar "osmode "oldsnap")
(alert "all done")

Link to comment
Share on other sites

Thanks for your suggestions.:)

 

I can understand the turn off Snap part...but do you know if it is the cause of this problem? and why?

 

I don't really understand why I need to have a Zoom E...could you please explain this?

Link to comment
Share on other sites

Like I said I have had problems many years of automating Autocad, two areas, not far enough out so stuff works, not close enough in so stuff works. The way around if still not working is try zoom c Pt scalefactor the Pt would be say an insert point of one of your blocks the scalefactor some number big enough to see whats goin on. maybe just Z C Pt scale at start and problems may go away. Having a look your going 6000 units thats a lot it could well be zooming problem.

 

Try dataextract it will list all blocks to excell can ramdomly check then any problems should turn up straight away you could do a if xyz1 xyz2 False

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...