AutoLISP Reference or API?

Discussion in 'AutoCAD' started by Khymaera, Mar 10, 2005.

  1. Khymaera

    Khymaera Guest

    I am new to AutoLISP and LISP in general however I am familiar with languages like Java & C# and I learn from buying reference manuals for that language. I am wondering if anyone knows of any reference or API manuals that are either free or for purchase.
     
    Khymaera, Mar 10, 2005
    #1
  2. Hi,

    Everything you need can be found in the help files.

    If you already use C#, why bother with Lisp?

    You will be able to code all you need with .NET and C#

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au

    languages like Java & C# and I learn from buying reference manuals for that
    language. I am wondering if anyone knows of any reference or API manuals
    that are either free or for purchase.
     
    Laurie Comerford, Mar 10, 2005
    #2
  3. Laurie,
    given that I know lisp and VB coding for acad, is it a big jump to go to C#?
    My impression is that it is and I dont get much for the trouble.
    What are the main gains if I am not interested in custom acad entities?
    I thought C and C# are rather dangerous if you do not know what you are doing and what to watch out for.
    Feel free to school me on this.


    "Laurie Comerford" <>
    |>Hi,
    |>
    |>Everything you need can be found in the help files.
    |>
    |>If you already use C#, why bother with Lisp?
    |>
    |>You will be able to code all you need with .NET and C#

    James Maeding
    jmaeding at hunsaker dot com
    Civil Engineer/Programmer
     
    James Maeding, Mar 10, 2005
    #3
  4. Hi James,

    There's not much point in regurgitating the advantages again.

    Search the Land Desktop Customisation group for posts by Peter Funk and read
    his information and the comments by others associated with those posts.

    Remember that Peter's role is to manage the development of the customisation
    features and APIs in Land Desktop/Civil Design. It is hard to imagine any
    one better placed to speak on this.

    --


    Laurie Comerford
    CADApps
    www.cadapps.com.au


    doing and what to watch out for.
     
    Laurie Comerford, Mar 11, 2005
    #4
  5. If you already use C#, why bother with Lisp?
    ?????

    Why you do not like LISP ? [autolisp, visual lisp]

    Please I do not want to sound like an old man... or being always in the past...

    I have done things in VBA, VB, ADS, ARX, PHP, languages that I not even have any idea... I just follow the samples on from the net... or from books... maybe only little things that they can not be count as a real programs and can be call hacks...

    But, if there is an easy way... why not taking that road?

    I am going to ask you for a simple way to read from an insert object with let say 20 nested blocks, scaled, not uniform, mirrored...

    Get from each of those blocks their insertion point, the object can be also an xref.

    How can you do the above inside of VBA?

    I really want to move to a superior language, only if I get convince... that worth my time and the learning curve is so easy.

    Luis Esquivel.
     
    Luis Esquivel, Mar 11, 2005
    #5
  6. Khymaera

    Jeff Mishler Guest

    Luis, here's something I just made up for you........xrefs are similar but
    different.......

    Code:
    Option Explicit
    
    Sub for_luis()
    Dim oEnt As AcadEntity
    Dim oBlkDef As AcadBlock
    Dim oBlkRefMain As AcadBlockReference
    Dim oBlkRefSub As AcadBlockReference
    Dim dPick
    
    ThisDrawing.Utility.GetEntity oEnt, dPick
    If TypeOf oEnt Is AcadBlockReference Then Set oBlkRefMain = oEnt
    Set oBlkDef = ThisDrawing.Blocks.Item(oBlkRefMain.Name)
    For Each oEnt In oBlkDef
    If TypeOf oEnt Is AcadBlockReference Then
    Set oBlkRefSub = oEnt
    With oBlkRefSub
    MsgBox "Block found....Name is " & UCase(.Name) & vbCr & _
    "Insertion Point: " & .InsertionPoint(0) & ", " & .InsertionPoint(1)
    & _
    vbCr & " ... at a Xscale of " & .XScaleFactor & " & Yscale of " &
    ..YScaleFactor
    End With
    End If
    Next
    End Sub
    
     
    Jeff Mishler, Mar 11, 2005
    #6
  7. Khymaera

    Khymaera Guest

    From what I was reading I figured I could use AutoLISP to create a simple interactive type script for yard layouts that would help me quote fence installations. I did not want to use Java or C# to create a whole new application although that might be the best option.
     
    Khymaera, Mar 11, 2005
    #7
  8. Thank you Jeff,

    Are you sure those insertion points are in the right position?

    Can you make the changes in order to place a point on each insertion, please....

    LE
     
    Luis Esquivel, Mar 11, 2005
    #8
  9. Khymaera

    Jeff Mishler Guest

    You're welcome Luis. No, the insertion points are not correct. I don't work
    with nested block entites much so I've never had a need to use
    transformations. After playing around with it and not getting results, which
    is not surprising since I'm clueless in this area, I found this link that
    might be of interest to you:
    http://www.cadvault.com/forums/showpost.php?p=38423&postcount=7

    I still don't know if that is the right approach, but I respect Glenn's
    ability enough to think that it is probably the solution. If it wasn't so
    late I'd try to incorporate it into my example.
     
    Jeff Mishler, Mar 11, 2005
    #9
  10. Hi,

    I just noticed a typo in this;

    It should have read:

    "It (Lisp) is far harder to debug than VBA."


    <snip>
     
    Laurie Comerford, Mar 11, 2005
    #10
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.