Thank you John,
Basically is the same I use:
(Or AcadDoc
(SetQ AcadDoc (vla-get-activedocument (vlax-get-acad-object))))
(defun undobegin (/)
(vla-endundomark AcadDoc)
(vla-startundomark AcadDoc))
(defun undoend (/)
(vla-endundomark AcadDoc))
The only diference is that you don't have there the active document as
global, hmmm.
All right here are my results:
1) After testing a command that creates a dimension and text style using
activex first, and then another one to make or convert objects in isometric
using entmake I still get the elock violation error and autocad stops.
2) If I place the line (command "_.undo" "_begin") before the call to the
activex function to create the dimension and text styles and at the end I
put (command "_.undo" "_end") the elock error do not happen for the
following let say five calls to the isometric command that uses entmake, but
if I remove those two lines before and after with the undo command it
happens right after the first call.
Okay maybe is telling me something...
Well, I gave up this I will remove two commands that are causing this... and
will re-write with vlisp/activex. To bad...
btw, can someone post the link to Stephan Kostner preventElockError.arx? I
would like to test those two commands before as a last resort.
Best regards,
Luis
"John Uhden" wrote in message
news:382B2FCDB277A8501D9982230266A46C@in.WebX.maYIadrTaRb...
> Using (entmake) and (vla-xxxUndoMark)
>
> Note that I recently found that (command ".Undo" "Mark") and (command
".Undo"
> "Back") are disregarded if an Undo;Group has been started by either the
> (command) or ActiveX versions, so...
>
> (defun @cv_undo_group ()
> (vla-EndUndoMark (vla-get-activedocument *acad*))
> (vla-StartUndoMark (vla-get-activedocument *acad*))
> )
> ;; *acad* should be an obvious global.
>
> --
> John Uhden, Cadlantic/formerly CADvantage
> http://www.cadlantic.com
> Sea Girt, NJ
>
>
> "Luis." wrote in message
> news:A5AEBDC0AD39406B082A31A21E90AED8@in.WebX.maYIadrTaRb...
> > > It appears you're creating an anonymous block. Try out my UBLOCK
routine
> > within
> > > the CVR15 app. If you (or anyone else) needs a temporary license let
me
> > know.
> >
> > btw, John are you using something in particular to create an anonymous
> > block? without using entMake and endBlock?
> >
> > Another thing, do you still use in your commands (command "_.undo"
> > "_group")? I just want to know.
> >
> > > I'm curious as to whether your code to make the definition/insert is
> > faulty or
> > > whether the ActiveX predecessor is causing the problem. There *are*
> > functions
> > > you are using that you haven't included for us to inspect. I presume
they
> > > (entmake) the entities in SSOBJ.
> >
> > Yes, I can't post the rest of the code.
> >
> >
> >
> > Thanks,
> > Luis
> >
> >
>