Hudson Posted October 26, 2009 Share Posted October 26, 2009 I'm getting this: INTERNAL ERROR: !scandr.cpp@2227: eLockViolation I am just doing simple math to some variables when the program crashes autocad... I'm confused as this section of code has worked before in other programs... I'm thinking there is something else going on to cause it. Any ideas? Quote Link to comment Share on other sites More sharing options...
SteveK Posted October 26, 2009 Share Posted October 26, 2009 You might have to post the code.. That error happened to Dante and I recently when using a reactor and entmod (See first post here). Quote Link to comment Share on other sites More sharing options...
Hudson Posted October 27, 2009 Author Share Posted October 27, 2009 Steve, good point. (setq a (dcl_TextBox_GetLine TSS_M1_TextBox27 0)) ; get the degrees (setq a (atof a)) (princ "/nValue of A: ") (princ a) (setq b (dcl_TextBox_GetLine TSS_M1_TextBox28 0)) ; get the minutes (setq b (atof b)) (setq b (/ b 60)) ; convert to minutes (setq c (dcl_TextBox_GetLine TSS_M1_TextBox29 0)) ; get the seconds (setq c (atof c)) (setq c (/ c 3600)) ; convert to seconds (setq TurnedAng (+ a b)) (setq TurnedAng (+ TurnedAng c)) ; LaserAng is now in DD format (princ "\nTurned Angle in DD: ") (princ TurnedAng) (setq TurnedAng (dtor TurnedAng)) ; LaserAng is now in Radians (princ "\nTurned Angle in Radians: ") (princ TurnedAng) (setq Test (- (* 2 pi) TurnedAng)) ; Autocad works counterclockwise with angles (princ "\nTurned Angle Remainder: ") (princ Test) (setq TurnedAng (+ Test BSAngle)) ; LaserAng From East X Axis CounterClockwise (princ "\nNew Value of Turned Ang") (princ TurnedAng) (setq b (atof (dcl_TextBox_GetLine TSS_M1_TextBox30 0))) ; Get the distance to the center of the front target (setq a (polar SetupPt TurnedAng b)) ; calculate the end coord of the laser line (entmake (list (cons 0 "LINE") ;(cons 8 LaserStnName) ; Layer ;(cons 6 KIND_LTYPE) ; Line Type (cons 62 6) ; Set Colour (cons 10 SetupPt) ; Beginning Coord (cons 11 a) ; End Coord ) ; End list ) ; End entmake That's the section of code that's making autocad barf. When I start getting errors, I break the code down and print variables to the screen a lot Autocad has crashed before it gets to the entmake command. Quote Link to comment Share on other sites More sharing options...
Hudson Posted October 27, 2009 Author Share Posted October 27, 2009 I just ran it again and it definitely crashes before (princ "\nNew Value of Turned Ang") makes it to the screen Quote Link to comment Share on other sites More sharing options...
Hudson Posted October 27, 2009 Author Share Posted October 27, 2009 It appears that the entmake is causing the crash. I guess I need to figure out vla-addline and try that Quote Link to comment Share on other sites More sharing options...
Hudson Posted October 27, 2009 Author Share Posted October 27, 2009 It was entmake causing the crash.. vla-addline works fine with a bit of a delay (is that normal?) Quote Link to comment Share on other sites More sharing options...
SteveK Posted October 27, 2009 Share Posted October 27, 2009 It was entmake causing the crash.. vla-addline works fine with a bit of a delay (is that normal?) I can only speak on the one time experience I noted above and at that time I also noted a alight delay with vla-addcircle. Anyone else? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.