problem with AutoCAD 2015

Started by ChristianGEO, August 19, 2015, 07:59:00 PM

Previous topic - Next topic

ChristianGEO

Dear:
My routine work without any problem in versions 2012, 2013 and 2014, using the Runtime OpenDCL corresponding to each version of AutoCAD. When I load my application in AutoCAD 2015 using the OpenDCL.x64.20.arx, although the dialog boxes there is instability in some options such as (selected in the dialog box options): try to export content to *. csv or * .txt, the said box does not close and the worst showing closes AutoCAD FATAL ERROR .... also when I try to export a table in AutoCAD with info from a content shown in Table or extracted from AutoCAD drawing hangs or is thinking infinitely.

I'm using version 8.0.1.0

What can be the reason?

Fred Tomke

#1
Hello,

I didn't test your code yet, but I watched the first video and I assume that it is related to the case you modify drawing database at runtime of the modal form (which looks very nice, btw).

In AutoCAD 2015 Autodesk has changed some internal things (like removing Microsoft fiber) that has consequences for applications. It was never a good idea to modify a drawing database at runtime of a modal form but since AutoCAD 2015 you actually have to make sure to close the form. You can find many threads in this forum that are related to this (like the latest).

Please follow the FAQ to pick a point from a modal form. At the place of picking a point you can make database modifictions.

BTW, be aware of using entmake in an area outside of current viewport: in AutoCAD 2000/AutoCAD 2000i I had some troubles with it and AutoCAD told me to create objects using ActiveX.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

ChristianGEO

Dear:
He would have to find the cause of the error in the source * .lsp and also I have to review the design of modal form OpenDCL Studio.

Thank you

ChristianGEO

Dear:
Apparently _-INSERT command is causing the problem, but why? is instability in 8.0.1.0 or tell your Autodesk has made changes to this version 2015. What you suggest I make.

thanks for your help.


Code (autolisp) Select
(repeat bloxf2
(setq entins1 (ssname bloxfl nq))
        (setq entatt1 entins1)
         (setq lstattsins nil)
         (setq tittag nil)
    (setq coord (trans (cdr (assoc 10 (entget entins1)))0 1))
    (setq blklaye (cdr (assoc 8 (entget entins1))))
    (COMMAND-S "_-LAYER" "M" blklaye "")
    (setq xpt (car coord))
    (setq ypt (cadr coord))
    (setq zpt (caddr coord))
        (while
            (= (cdr (assoc 0
                           (setq lent (entget (setq entatt1 (entnext entatt1))))
                    )
               )
               "ATTRIB"
            )  ;; comprobar el primer attributo del bloque si tiene data attrib
                               (setq rttag (assoc 50 lent))
               (setq tag (cdr (assoc 2 lent)))
               ;;extrae el nombre del ATTRIB
               (setq val (cdr (assoc 1 lent)))
               ;;extrae el valor de ATTRIB
               (setq lstattsins (cons (list tag val) lstattsins))
               ;;formar lista con el nombre y el valor de atributo
               (setq tittag (cons tag tittag))
            )
(setq contcold 0)
(setq valtag nil)
(setq idcampdat (length datcolm))
    (repeat idcampdat
    (setq nombar(nth contcold datcolm))
      (if (equal nombar "")
        (progn
        (setq nam1 "")
        (setq valtag (cons nam1 valtag))
        (setq contcold (+ 1 contcold))
        )
        (progn
        (setq nam1 (cadr (assoc nombar lstattsins)))
(if (>= contcold 8)
  (progn
    (setq vardmz (getvar "dimzin"))
(setvar "dimzin" (logand vardmz (~ 8))) ;desactivar el bit de supresion de cero a la derecha
    (setq nam1(rtos (atof nam1)2 2))
    (setvar "dimzin" vardmz)
    ))

        (setq valtag (cons nam1 valtag))

        (setq contcold (+ 1 contcold))
        )
          )
        )
(setq plotnw (reverse valtag))

    (cond ((= opttp 1)(setq namgen "LEYCORPMC"))
          ((= opttp 3)(setq namgen "LEYCORPMV"))
          ((= opttp 2)(setq namgen "LEYCORPT"))
          )
       
       (setq angrt(angtos (cdr rttag)0 7))
   
    (command-s "_-insert" namgen "R" angrt (list xpt ypt zpt) "" "") ;;;<====================================
        (mapcar 'command-s plotnw)

    (entdel entins1)
   
    (setq nq (+ 1 nq))
)

Fred Tomke

Hi, Christian,

command-s is for calling commands asynchronously, but you have to call it completely without any pause tag.
The problem is not calling insert-command it self - the problem is where or when do you call it.
I have headache with your line
Code (autolisp) Select
(mapcar 'command-s plotnw)
Please comment it out and keep the single "(insert ..." line above. Does ist still crash?
Then we have to redesign your workflow with your form.
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]