TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: DEVITG on August 24, 2004, 12:56:27 PM
-
(vl-load-com)
(setq e-ENTITY (car (entsel "\nPick ENTY:")))
(SETQ EG-ETY (ENTGET e-ENTITY))
(setq vla-ENTITY (vlax-ename->vla-object e-ENTITY))
This give me this error
Automation Error. No database
What it's happen???? :oops:
-
what are you selecting in the dwg?
-
<guess>Selecting a custom object, like an Autoplant component?</guess>
-
a line , or a cube 3dsolid.
as follow
((-1 . <Entity name: 40062d78>) (0 . "3DSOLID") (330 . <Entity name: 40062cf8>) (
-
Beats me! Using your code I get the following.
((-1 . <Entity name: 7ef60e18>) (0 . "3DSOLID")
#<VLA-OBJECT IAcad3DSolid 08c48eb4>
-
It is the dwg
http://theswamp.org/lilly.pond/devitg/cube%20line.dwg
it is the code
(defun c:v-p ()
(vl-load-com)
(setq e-ENTITY (car (entsel "\nPick ENTY:")))
(SETQ EG-ETY (ENTGET e-ENTITY))
(setq vla-ENTITY (vlax-ename->vla-object e-ENTITY ))
);_end defun
(c:v-p)
-
It's possible, you missed or are in a paperspace layout and not mspacing through, therefore selecting nothing. If you were to set up a trap i.e.
(while (not (setq ent (car (entget "\nblah blah:"))))
(princ "\nYou missed.")
)...
you shouldn't get an automation error.
-
(defun c:vp ( / ename )
(if (setq ename (car (entsel)))
(vlax-ename->vla-object ename)
)
)
-
I have no problems with the dwg either.
-
the e-ENTITY is selected
I work on model space as follow
<Entity name: 40062d78>
the problem when I do
(setq vla-ENTITY (vlax-ename->vla-object e-ENTITY))
Seem to be some related whit VL
It is a new instalation , maybe I lost some to include on it.
-
all my lisp with a vl, fault , what could be lost .
The vl.arx is loadaed
Help me please
As I told , it is a new ACAD instalation after a hard disk change.
:cry: :oops: :cry: :oops: :cry:
-
I don't think that error is caused by this, but it can't hurt to try..... type (vl-load-com) before running your routine. If that solves it, add (vl-load-com) to your acad.lsp file
Good luck!
-
please see my code , it has the (vl-load-com)
So, that is not the fault.
-
If it's a new install, try running a repair in the add/remove under control panel. Might fix the problem.
-
I did 3 times the install , the error persist.
HELP ME PLEASE
-
I solve it , migrating to win xp
-
I can't help but laugh because your avatar fits that statement.
Sorry?