Jump to content

Collapsing lines in AutoCAD 2011 (with OSMODE = 0)


MSasu

Recommended Posts

I just encountered a very strange behaviour on an AutoCAD 2011 station – the lines generated by an AutoLISP routine are all collapsing to random points, something similar with running code with OSNAP modes activated. The routine have protection for OSMODE variable and I also tested with it set to 0 by default, but the error is still there. That tool works correctly on versions 2008 and 2009.

Did someone know if there is a new feature in AutoCAD 2011 that can cause this behaviour?

Thank you!

 

Regards,

Mircea

Link to comment
Share on other sites

Do you have access to the source code? Or is it compiled FAS / VLX? Usually it's better to use a "_None" OSnap before sending a point to a command, rather than fiddling with OSMODE. I'm unaware of any new settings in 2011 which would make this work wrong.

 

It might also be a good idea to atach the code here, so we can check what's going on with it (if you're allowed to do so of course).

Link to comment
Share on other sites

The code is not complied, it is written by me; seems that this is something specific to version 2011 - it cause no problems in other versions (2008, 2009 and 2010).

Not sure why specifying "_none" before feeding points will be different that OSMODE = 0, but will give this a try. Thank you for your suggestion.

 

Unfortunately attaching a code excerpt is not possible.

 

Regards,

Mircea

Link to comment
Share on other sites

The None thing does not do anything different than setting OSMode=0. I just prefer using it since then there's no need to check for errors and resetting OSMode: i.e. the usual question of why is my snaps turned off ... after the user's used your code and changed his mind halfway through, pressing Esc :ouch:

 

For me it's just better to avoid possible problems than trying to fix them through custom *error* handlers.

 

Why you get the 2011 problem though is beyond me, unless I can have some more info. Maybe it's a command which has different settings names. I know ADesk changed some shortcuts in command parameters, usually that can be circumvented by sending the full word of the parameter instead of just the shortcut 1 or 2 letters.

Link to comment
Share on other sites

Just found out that the trouble-maker entities are the SPLINES. Even if OSMODE = 0 there is still a point automatically recognised on each vertex of splines – it is marked with a square thinner than the one used for EndPoints and the tool-tip is naming it “Somme 3D” (translated as “Vertex 3D”, but not sure if this is the name used in English AutoCAD). However this type isn’t listed in Osnap list.

 

post2.gif

 

Regards,

Mircea

Link to comment
Share on other sites

R2011 introduces "3D Osnaps" as a separate option: perhaps it's one of them?

 

dJE

 

The variable you need to check out is "3DOSMODE" dJE

Edited by danellis
Link to comment
Share on other sites

@danellis: Thank you very much for your answer - this was the source of the error. I have disabled that mode and all is working correctly.

 

Regards,

Mircea

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