TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: DEVITG on August 24, 2004, 12:56:27 PM

Title: Automation Error. No database
Post by: DEVITG on August 24, 2004, 12:56:27 PM
Code: [Select]
(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

 
Quote
Automation Error. No database



What it's happen???? :oops:
Title: Automation Error. No database
Post by: Mark on August 24, 2004, 01:04:09 PM
what are you selecting in the dwg?
Title: Automation Error. No database
Post by: MP on August 24, 2004, 01:06:11 PM
<guess>Selecting a custom object, like an Autoplant component?</guess>
Title: Automation Error. No database
Post by: DEVITG on August 24, 2004, 01:12:11 PM
a line , or a cube 3dsolid.

as follow

((-1 . <Entity name: 40062d78>) (0 . "3DSOLID") (330 . <Entity name: 40062cf8>) (
Title: Automation Error. No database
Post by: Mark on August 24, 2004, 01:20:17 PM
Beats me! Using your code I get the following.
Code: [Select]

((-1 . <Entity name: 7ef60e18>) (0 . "3DSOLID")
#<VLA-OBJECT IAcad3DSolid 08c48eb4>
Title: here is the dwg I use
Post by: DEVITG on August 24, 2004, 01:26:41 PM
It is the dwg

http://theswamp.org/lilly.pond/devitg/cube%20line.dwg

it is the code

Code: [Select]

(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)
Title: Automation Error. No database
Post by: daron on August 24, 2004, 01:27:14 PM
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.
Code: [Select]
(while (not (setq ent (car (entget "\nblah blah:"))))
(princ "\nYou missed.")
)...

you shouldn't get an automation error.
Title: Automation Error. No database
Post by: MP on August 24, 2004, 01:33:58 PM
(defun c:vp ( / ename )
    (if (setq ename (car (entsel)))
        (vlax-ename->vla-object ename)
    )
)
Title: Automation Error. No database
Post by: Mark on August 24, 2004, 01:35:11 PM
I have no problems with the dwg either.
Title: Automation Error. No database
Post by: DEVITG on August 24, 2004, 01:38:41 PM
the   e-ENTITY is selected

I work on model space  as follow

<Entity name: 40062d78>

the problem when I do



Code: [Select]
(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.
Title: seem to be a vl fault
Post by: DEVITG on August 24, 2004, 08:19:57 PM
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:
Title: Automation Error. No database
Post by: Jeff_M on August 24, 2004, 11:37:57 PM
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!
Title: Automation Error. No database
Post by: DEVITG on August 25, 2004, 08:04:12 AM
please see my code , it has the (vl-load-com)

So, that is not the fault.
Title: Automation Error. No database
Post by: daron on August 25, 2004, 09:05:26 AM
If it's a new install, try running a repair in the add/remove under control panel. Might fix the problem.
Title: Automation Error. No database
Post by: DEVITG on August 25, 2004, 07:16:00 PM
I did 3 times the install , the error persist.
HELP ME PLEASE
Title: Automation Error. No database
Post by: DEVITG on August 29, 2004, 09:59:18 PM
I solve it , migrating to win xp
Title: Automation Error. No database
Post by: MP on August 29, 2004, 11:11:10 PM
I can't help but laugh because your avatar fits that statement.

Sorry?