Author Topic: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)  (Read 4180 times)

0 Members and 1 Guest are viewing this topic.

msasu

  • Mosquito
  • Posts: 13
Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« on: January 19, 2011, 05:03:48 AM »
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

Biscuits

  • Swamp Rat
  • Posts: 502
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #1 on: January 19, 2011, 08:12:29 AM »
SWAG (Scientific Wild A$$ Guess) from someone who does not have Acad2011......Constraints maybe?

Joe Burke

  • Guest
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #2 on: January 19, 2011, 08:13:24 AM »
Can you post the code?

jromkes

  • Guest
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #3 on: January 19, 2011, 08:23:15 AM »
OSNAPCOORD system variable maybe?

msasu

  • Mosquito
  • Posts: 13
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #4 on: January 19, 2011, 08:31:42 AM »
Thank you for your answers.

@Biscuits: Don't know anything about constrains in AutoCAD - will have to investigate this hypothesis.

@Joe Burke: No, I'm not allowed to do that.

@jromkes: At this time I cannot test this hypothesis in AutoCAD 2011, but the OSNAPCOORDS variable is available also in AutoCAD 2008 and that code works well in this version. Anyway, will investigate this ASAP.

Regards,
Mircea

Joe Burke

  • Guest
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #5 on: January 19, 2011, 09:03:12 AM »
Given you can't post the code (duh) at least tell us what method is used to create the lines. entmake, ActiveX, command...?

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #6 on: January 19, 2011, 09:07:57 AM »
Perhaps you haven't accounted for UCS?

Joe Burke

  • Guest
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #7 on: January 19, 2011, 09:20:53 AM »
On second thought, I suspect you are using a LISP routne which only works correctly in WCS. IOW, the fact it seems to misbehave in 2011 is just an artifact of the condition you always used the routine in WCS before with previous versions.

If so, check the trans function.

Joe Burke

  • Guest
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #8 on: January 19, 2011, 09:24:04 AM »
Perhaps you haven't accounted for UCS?

Hi Lee

Exactly

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #9 on: January 19, 2011, 09:27:13 AM »
Perhaps you haven't accounted for UCS?

Hi Lee

Exactly

Great minds think alike Joe  :wink:

msasu

  • Mosquito
  • Posts: 13
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #10 on: January 20, 2011, 02:59:25 AM »
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.

Regards,
Mircea

Daniel J. Ellis

  • Swamp Rat
  • Posts: 811
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #11 on: January 20, 2011, 03:34:06 AM »
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
===
dJE

msasu

  • Mosquito
  • Posts: 13
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #12 on: January 20, 2011, 07:32:45 AM »
@Daniel J. Ellis: 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

Lee Mac

  • Seagull
  • Posts: 12922
  • London, England
Re: Collapsing lines in AutoCAD 2011 (with OSMODE = 0)
« Reply #13 on: January 20, 2011, 03:54:21 PM »
@Daniel J. Ellis: Thank you very much for your answer - this was the source of the error. I have disabled that mode and all is working correctly.

Mircea,

Why not create the lines using entmake(x) or the ActiveX method AddLine? This way you would not have to worry about OSnaps at all  :-)