Jump to content

Draw & Automaically Label Dist on Centerline Pts...


Recommended Posts

Posted

The error msg pops up after clicking "OK" on the "Golfset" msg box, AND then moving the cursor to an area to start the first point of the centerline. As soon as the cursor "Snaps to a grip", then the "Unhandled Access Violation Exception" msg pops up.

 

With OSNAP "Off", no grips are selected and thus no error msg...

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

  • Lee Mac

    24

  • CAB

    18

  • JWeyer

    11

  • David Bethel

    1

Top Posters In This Topic

Posted Images

Posted

Hmmm... I can't quite see how the osnaps are causing the error, but I will be interested to see what CAB comes up with. :P

Posted

I eliminated all the other commands except the pline command.

Also added some debug comments.

Give this a try.

 

You should see this at the command line.

Command: golf

 

"Making layers."

Consruct Polyline:

 

"Pline Entered by user."

"Got a LWPolyline."

"Updating Pline."

"Pline update complete."

"Adding Text."

"Adding Flag Block."

"Complete, exiting routine."

Function Complete.

Golf CL 06.LSP

Posted

CAB,

 

Have you just added a set of command line prints to the code or a whole debugging program?

Posted

I added prints to the command line throughout the code to allow the user to tell how far the code got by identifying the text at the command line.

Posted

Here is the latest version.

I added code to place the text at the bisecting angle if the vertex.

Also only alerts once per session.

Golf CL 07.LSP

Posted

Thanks again for all the hard work and interest...

 

I just tried "Golf CL 07.lsp" with osnap "off" and it works as expected. Turn osnap "on", move cursor around the screen and no problem, move cursor closer to expected tee location and bingo! Same error msg again in the same drawing...

 

In case your are wondering about my operating system, I've attached screen shots just for info...

 

Intel D915GEV mother board, 3.00 GHz, 2.87 MB RAM on XP (4.0 GB on VISTA), ATI FireGL V5000 GCard.

 

I just tried to some tweaking on the video card but still experienced the same problem upon retesting.

 

I really think that we are dealing with a problem within autocad, windows or my computer. I'm going to test this on my laptop and see what the results will be. I have a feeling that it will work on my laptop as expected.

 

I suggest that you not waste any more effort on this elusive problem. Let's just turn "off" the osnap at the beginning and turn on at the end, if was on at the beginning, and move on...

 

Thanks again,

Jer

Operating Sys Specs.jpg

Posted

As a fix for now - I have updated the LISP to switch off the osnaps before constructing the pline - its not ideal, but it'll get you by.

Golf CL 08.LSP

Posted

I believe that I've finally identified the root cause of the error problem.

 

It's a "-pure virtual function call" from AutoCAD to the "Microsoft Visual C++ Runtime Library". (See Attached Image)

 

The "Unhandled Exception Violation" will ALWAYS occur when the Osnap Setting "Nearest" is selected.

 

Also, the "Unhandled Exception Violation" will SOMETIMES occur when the Osnap Setting "Apparent Int" is selected, depending on when you turn it "On" when drawing subsequent pline(s).

 

I tested this while using just the pline command and the attached DWG file (Set your "Background" color to "DK Gray" for viewing my color settings) over, and over while using different Osnap setting. I found that AutoCAD would sometimes seem to "add" the "Nearest" setting.

 

I don't know what version of MS C++ was used for R14, nor if, or when this problem was ever corrected.

 

Later versions of AutoCAD may or may not have this same problem...

 

I hope that this will help others that have had similar problems with Unhandled Exception errors...

 

Have a great day!

Jer

Microsaft Visual C++ Runtime Library.jpg

TopoEndPts1.dwg

Posted

Blimey JWeyer, never heard of that error before - although you don't really know how many changes have occurred to C++ since R14 of ACAD, so there may well be some compatibility issues.

Posted

Lee

Here is a better way as it doesn't reset the osmode but toggles them off.

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