×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Convert LISP to VBA

Convert LISP to VBA

Convert LISP to VBA

(OP)

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.

RE: Convert LISP to VBA

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.

RE: Convert LISP to VBA


  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.

   

RE: Convert LISP to VBA

(OP)
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

RE: Convert LISP to VBA


  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
  

RE: Convert LISP to VBA

(OP)
Hi Estassoc,

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

Dan

RE: Convert LISP to VBA


  Dan

  You're welcome. Glad to have helped.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources