ARC describing in script command

ARC describing in script command

Kotaro.Takeda
Observer Observer
921 Views
7 Replies
Message 1 of 8

ARC describing in script command

Kotaro.Takeda
Observer
Observer

I'm now writing 2D design by using attached text commands in AutoCAD LT 2018, Windows 10. It has frequently happened *invalid* error when it described ARC. I listed ARC as below,

ARC C
28.75,12
28.75,13
27.75,12

which pointed center of the arc, starting and ending point. 

When I break it into an isolated command to describe arc only, it always works. However, when I induces it into command list, it happens *invalid error as attached screen shot. 

What is a bad point in script?

0 Likes
Accepted solutions (2)
922 Views
7 Replies
Replies (7)
Message 2 of 8

h_s_walker
Mentor
Mentor

That is a really weird one. I can open a blank drawing and run your script once perfectly fine in LT2016. HOWEVER if I try to run it a second time I get the same error you do.

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

EESignature


Left Handed and Proud

Message 3 of 8

cadffm
Consultant
Consultant

Hi,

 

I can't reproduce the problem, but both of your descriptions sounds like a object snap issue,

in the .scr you don't you care - so this could be the problem.

Turn your osnaps off for a test or set osnapcoord to 1 as first step.

Sebastian

Message 4 of 8

h_s_walker
Mentor
Mentor
Accepted solution

@Kotaro.Takeda Yeah that does seem to be the problem. I turned off my snaps and your script ran fine 3 times in a row

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

EESignature


Left Handed and Proud

Message 5 of 8

cadffm
Consultant
Consultant
Accepted solution

If you don't want to use the current running object snap setting (OSMODE),

set up the object snap handing for coordniate inputs in automations off, in the first line  osnapcoord 1

(this is the profile setting in Options/User Preferences)

Sebastian

0 Likes
Message 6 of 8

Kotaro.Takeda
Observer
Observer

Perfect. I can run the script perfectly about 10 times in my environment by offing the object snap. Thank you.
I'd like to ask you why the object snap disturbs script running? It's curious because the object snap only works when my mouse moving, I believe.

0 Likes
Message 7 of 8

cadffm
Consultant
Consultant

@Kotaro.Takeda  schrieb:

>>"I'd like to ask you why the object snap disturbs script running?"

Because your running object snap setting(osmode/3dosmode) and setting for

coordinate input by mouse, keyboard and automation (osnapcoord)

and at last your current view, while running the script

resulted in snaped points instead of your coordinate input.

 

>>"It's curious because the object snap only works when my mouse moving, I believe."

That's wrong! Check your settings, I guess your setting for is the default value =2

and now read your Help[F1]:

The default(2) is setup to use running object snaps while input coordinates by  mouse OR WHILE IN AU...

 


If you don't want to use the current osnaps, set osnapcoord=1 in your first line script/macro/(send)command

 

Sebastian

0 Likes
Message 8 of 8

cadffm
Consultant
Consultant

optionsX.png

Sebastian

0 Likes