Hi,
I am trying to automate the creation of a solid boat geometry using scripting in autoCAD/accoreconsole. Mentioned below is the flow of my script:
Attaching the script file with this post.
The problem I am currently facing is that whenever I run the script, one of the lofted surface comes out weird. However, If I copy paste the contents of my script file in the command line of autoCAD, the 3D geomtery comes out as desired.
Please help me find where I am going wrong.
I tried the script and the manual version, I can replicate the error but so far I also have not found a cause for the difference in behaviour. Maybe the people over at the customization forum will have a better understanding what is causing the problem
Why do you need to automate the creation of this shape? If it is just an excercise you can also try to do it in Autolisp instead of with a script. If you need to recreate this shape often for work I would suggest using a block or a template drawing.
Okay, deep digging after 5 moth, but ok.
I didn't test it, but i couldn't see any osnap handling in your script and so i am guessing you stumbled about that.
Set your osnapcoord to 1 or handle the osnap otherwise.
Background: Copy&Paste to commandline is the same as type in by hand,
but macro script or (send)command will detect as automation and the standard setting is:
Input coordinates by hand: Acad ignores running osnaps,
in automation acad respects running osnaps.
Again: I didn't check your case, but what i write matchs your description generally.
Sebastian
@cadffm @hardikyp
I saw this post a while ago and I wanted to test it, but I kept putting it off and finally got to it. I'm sorry if this looks like I'm reviving a dead post.
What Sebastian mentioned is 100% correct and I completely missed it. I just added OSMODE 0 at the beginning of the script and everything worked perfectly. You can add OSMODE with the bitvalue of your preferred Osnaps at the end to put your object snaps back in working order.
Can't find what you're looking for? Ask the community or share your knowledge.