Started by dgpuertas ·
2010-03-24 12:09 UTC ·
8 replies · SMF topic #1232
dgpuertas
2010-03-24 12:09 UTC
Hi,
When I use a function to create entities via entmake with a button in a Modeless dialog AutoCAD crash.
Appear "INTERNAL ERROR: !scandr.cpp@2232: eLockViolation" and close AutoCAD.
¿Does anyone know what happens?
I use AutoCAD 2010 Spanish and OpenDCL 6.0.23 (last version)
Sorry about my English
owenwengerd
2010-03-24 13:06 UTC
You'll either need to lock the document first, or execute your event handler with EventInvoke set to Asynchronous.
fred_tomke
2010-03-25 06:13 UTC
Hi, dgpuertas,
another chance would be to create new entities using ActiveX methods instead.
I made the bad experience that AutoCAD crashes if I tried to create a new entity using entmake outside the visible area of the current viewport.
Fred
dgpuertas
2010-03-25 13:00 UTC
How I can lock the document?
its the .odcl document?
Neither I know how to use EventInvoke,
I use a button with the Event Clicked inside the modeless dialog.
Thanks
Sorry about my English.
fred_tomke
2010-03-25 13:45 UTC
author=dgpuertas link=topic=1232.msg6612#msg6612 date=1269522002 wrote:
Neither I know how to use EventInvoke,
Hi, dgpuertas,
- Open your odcl file in OpenDCL Studio
- select you button
- activate the property panel
- searach for the property EventInvoke
- Set the value to 1=AllowCommand
- turn to Autocad
- call the line (dcl_project_load "MyProject" T)
- restart your command
Should work now.
Fred
owenwengerd
2010-03-25 16:13 UTC
author=dgpuertas link=topic=1232.msg6612#msg6612 date=1269522002 wrote:
How I can lock the document?
its the .odcl document?
No, the AutoCAD document.
fred_tomke
2010-03-25 16:38 UTC
author=owenwengerd link=topic=1232.msg6614#msg6614 date=1269533623 wrote:
No, the AutoCAD document.
That's also interesting for me: how do you lock the document with lisp?
Fred
owenwengerd
2010-03-25 18:37 UTC
I don't think there are any built in functions to directly lock and unlock a document via lisp, so you have to do it indirectly through ActiveX or by sending a command to the command line.
dgpuertas
2010-03-26 10:02 UTC
Thanks Fred,
EventInvoke works fine.
I don´t know how to lock de autocad document but EventInvoke is valid for me.
Thanks a lot at Fred and owen,
Ciao