+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: lisp to vba

  1. #1
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Feb 2008
    Posts
    294

    Default lisp to vba

    How do i do the following in vba??

    Im having trouble translating the code

    Code:
         (setq startPt (vlax-curve-getPointAtDist UpperObj stepLength))
         (setq startPt2 (vlax-curve-getPointAtDist UpperObj stepLength2))
    
         (setq endPt (vlax-curve-getClosestPointTo BottomObj startPt))
         (setq endPt2 (vlax-curve-getClosestPointTo BottomObj startPt2))
    (setq a1 (list (car startpt)(cadr startpt)))
    (setq b1 (list (car endpt)(cadr endpt)))
     (setq rad1 (angle a1 b1))
        (setq ang  (alg-ang UpperObj startPt))
        (setq ang2 (alg-ang UpperObj startPt2))

  2. #2
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    VBA hasn't vlax-curve- functions or some another functions for analyse of curves geometry but VB.NET has.

  3. #3
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Feb 2008
    Posts
    294

    Default

    Thanks asmi.

    i've found the vlax.cls and curve.cls files that are floating around the internt.

    Have you had any experience with these?

    Whats your opinion on using them??

  4. #4
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    I have some experience with CurveGeometry Interface in .NET, but I prefer C# not VB.

  5. #5
    Full Member
    Using
    Mechanical 2008
    Join Date
    Jan 2008
    Posts
    89

    Default

    Quote Originally Posted by russell84 View Post
    Thanks asmi.

    i've found the vlax.cls and curve.cls files that are floating around the internt.

    Have you had any experience with these?

    Whats your opinion on using them??
    Ive used them before, but had problems with crashing when running through loops (getting a bazillion points along a spline, constantly calling the class, instead of being able to send a big pile of data in one shot). My *guess* is, (and i hope Im wrong), is that even VLisp runs asynchronously, like AutoLisp, and I was spooning data from VB faster than it could process it.

  6. #6
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Feb 2008
    Posts
    294

    Default

    SO rocheey if i was to use these class files what would be the method you would use to get around this error??

    What did you end up doing??

    Otherwise i think i might go that next step and look into the C#

  7. #7
    Super Member ASMI's Avatar
    Using
    AutoCAD 2008
    Join Date
    Nov 2005
    Location
    Oceanus Procellarum, Moon
    Posts
    1,427

    Default

    If it is pleasant to you VB to you it is absolutely not necessary to study C #. Philosophy of .NET - universality and full compatibility at use of programming languages. On VB.NET to you it is accessible the same objects, methods and properties as on C# or Mahaged C++, a question only in construction of algorithms. However in .NET you will see Object Model AutoCAD which differs from VBA (COM), much additional methods and properties.

  8. #8
    Full Member
    Using
    Mechanical 2008
    Join Date
    Jan 2008
    Posts
    89

    Default .net, etc

    Although I dabble in .net, vb6, etc, I use VBA because it's *here*. On all the machines. We are a CAD business, not a development house, and having to take code home to tweak a bug or 'whip up' a utility is unacceptable for me.

    Having said that, it looks like Im going to have to do *something* before we end up in 64-bit, and my VBA routines die a slow death.

    Without starting a language war, what would be a natural jump for someone with 20+ years PC/GW/Q/VBDos/VB basic experience? Im flirting with Visual Lisp; it's on the machines, and it seems to support activex ... unless VBA is getting replaced with something robust I can get a jump on .... any takers here?

  9. #9
    Forum Deity SEANT's Avatar
    Using
    AutoCAD 2012
    Join Date
    Aug 2005
    Location
    Rhode Island
    Posts
    2,128

    Default

    Conceivably, AutoCAD will incorporate Visual Studio Tools for Applications (VSTA) sometime in the near future – replacing VBA. That VSTA offering would likely allow programming via any of the current (and perhaps even those in development i.e., F#) flavors of .NET. Concentrating on one of those now would probably be a sensible move for anyone doing ACAD dev work.

    I’d be interested to hear what the future holds for Visual Lisp. It may well suffer the same long term fate of VBA as they both access the same COM port.

    Incidentally, rocheey, I see you are using Mechanical: Have you ever used the extended VBA capabilities offered by the McadAuto, BrepAuto, GeAuto libraries? With regard to the original query of this thread the GeAuto library offers the same functionality of vlax-curve. The BrepAuto would allow the more in depth examination of 3dSolids.

  10. #10
    Senior Member
    Using
    Civil 3D 2008
    Join Date
    Feb 2008
    Posts
    294

    Default

    Registered forum members do not see this ad.

    Guys would someone be so kind as to even show me one line of how to use vlax-curve functions within vb.net??

    how do you do for instance obtain a point at distance along a curve in vb.net??


    Thanks

Similar Threads

  1. Running a lisp in another lisp??
    By neekcotrack in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 26th Aug 2008, 04:02 am
  2. Lisp Call Lisp Problem
    By neekcotrack in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 23rd Aug 2008, 12:56 pm
  3. problem, trying to running a list of lisp from within a lisp
    By twind2000 in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 20th Aug 2007, 04:27 pm
  4. calling another lisp from within my lisp
    By thalon in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 22nd Feb 2006, 09:56 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts