Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert LISP to VBA 1

Status
Not open for further replies.

danielhyde

Civil/Environmental
Feb 7, 2003
23
GB

Hi,
Is it possible to convert a LISP routine in to VBA routine? I have only a little knowledge of LISP and VBA. (I understand what it’s doing, but I am not sure how to write it)

We currently have a routine that inserts XREF's of OS mapping in to a drawing by the user selecting a point on the screen (world UCS), this point is then analysed by the routine and finds the area of mapping file name which is the location
e.g. Filename TQ0050NE = area of screen of 500500,150500(bottom left corner) within a rectangal of 500,500. The problem is that we know need to put all the xrefs in to new folders and sub-folders and LISP can not find the files without a support path to each folder (there would be over 20) so this would prove rather tiring to set up on each machine. So I would be to specify a start from a Location such as G:\CAD\OS-map\1250\, and LISP does not have a function to do this but I think VBA can?

So what I would like to known is can any tell me how to convert for LISP to VBA, or how to write it from scratch in VBA and then how to find the correct xref based on location (name)

I can supply the LISP file if it would help
Thanks for any help.
 
Replies continue below

Recommended for you

I'm not sure I understand why moving the support folders causes a problem that can not be overcome with lisp. If you know the paths of all the support foldrs, this could be added to the lisp routine. Or the routine could automatically add all the folders to the support path rather than you doing it manually.
 

Are you referring to Visual Lisp functions?
These functions are patterned after VBA but
the format is similar to Autolisp.

You can also use plain AutoLisp (see the
function "getfiled") which gives the user
the flexibility to look for the directory
where the xref drawings are located.

 
Hi,
Thanks
CarlB - I think that as there would be over 35 new support paths it would make autocad slower as it would be searching through these paths for other commands?.

Estassoc - I idea of the Routine is to xref the correct file without the user doing anything but selecting the area.
Thanks for your help
Dan
 

DanielHyde,

Could you send me a copy of the routine.
I may be able to have a better understanding
of what the problem is all about.
Email: dparc7491@yahoo.com
 
Hi Estassoc,

Thanks for all your help; the modified lisp routine now does exactly what I want it to do.
Thanks

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top