Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Visual Basic no go…

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
Anonymous
268 Views, 2 Replies

Visual Basic no go…

Hi All,

 

I have this code w/ which I can open up Block Library Blocks for editing.  We have R2012 installed w/out VBA.

Our MIS department is impossible to deal with.  We have this new fangled permission hysteria so I cannot install VBA myself.

 

Is there any other way to open up my blocks?  See the last two lines: What I can I do instead?

 

(defun C:OpL () (prompt "...Open Library Block or Xref...")(terpri)

(setq a (entsel)) (setq b (car a )) (setq c (entget b)) (setq d (assoc 2 c))

(setq e (cdr d)) (setq ff (strcat e ".dwg")) (setq PP (findfile FF))

(setq opath (strcat "acadapplication.documents.open \""PP"\""))

(command "vbastmt" opath))

 

Thank you,

 

GS

2 REPLIES 2
Message 2 of 3
lando7189
in reply to: Anonymous

Use Visual LISP to access the AutoCAD model:

 

(defun C:OpL () (prompt "...Open Library Block or Xref...")(terpri)
(setq a (entsel)) (setq b (car a )) (setq c (entget b)) (setq d (assoc 2 c))
(setq e (cdr d)) (setq ff (strcat e ".dwg")) (setq PP (findfile FF))
(vl-load-com)
(vla-open (vla-get-documents (vlax-get-acad-object)) pp)
)

 

-- Lanny

Message 3 of 3
Anonymous
in reply to: lando7189

Lanny,

Thank you, it works!!

GS

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost