See the top rated post in this thread. Click here

Results 1 to 9 of 9

Thread: Doubt about using C # or LISP

  1. #1
    Member
    Join Date
    2015-12
    Posts
    9
    Login to Give a bone
    0

    Question Doubt about using C # or LISP

    Excuse me if I am repeating something that already exists in the forum, I recently-started my studies with AutoLISP, however, i already have experience with C #. Really need to learn AutoLISP or get the same results with the .NET libraries?
    For example, I need to create a command que will allow me to draw the line on the surface and return the slope. Basically the code would need to collect the initial and final elevations intercepted by the line and with length of the line, return the slope calculus in percent.
    How could I develop this code? With C # or AutoLISP? Both?

  2. #2
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    1

    Default Re: Doubt about using C # or LISP

    Could do it in either. dotNET requires a little more up front but is easier put everything together, and easier to extend (especially with OO design practices). LISP is easier to get going with but can bog down with implementing the math.
    If you are going to fly by the seat of your pants, expect friction burns.
    Some say beauty is in the eye of the Beholder... perhaps so, but I've only seen the disintegration beam.
    Everyone else being wrong is not the same thing as being right.

  3. #3
    Member
    Join Date
    2015-12
    Posts
    9
    Login to Give a bone
    0

    Default Re: Doubt about using C # or LISP

    Thank you, in which case I will leave the AutoLIPS for now and study the SDK for .NET

  4. #4
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,500
    Login to Give a bone
    1

    Default Re: Doubt about using C # or LISP

    You ultimately use what's best for the job/task, generally based on the Object(s) you're needing to interact with, and what Properties, Methods, and Events they make available to a given API.

    So for example, if your Surface exposes a would-be GetElevationAtPoint Method to both APIs, then a simple LISP which prompts user for start/end point, and a pair of calls to the Surface's GetElevationAtPoint Method supplying each of the aforementioned points as parameter, then you no longer have a need to append a line entity to the drawing's database, and subsequently query the intersection points.

    Whereas if this method isn't exposed to LISP, you could use .NET API to perform this task directly, or instead develop a custom LispFunction Method to expose the necessary Transaction to LISP indirectly supplying parameters within the LispFunction Method call within your Defun, if that makes sense.

    ... It's all about choosing the right tool for the job, and then overruling that choice with your preference, of course. Haha

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  5. #5
    Member
    Join Date
    2015-12
    Posts
    9
    Login to Give a bone
    0

    Default Re: Doubt about using C # or LISP

    Thanks BlackBox, about this handlers/methods lisp, have you any reference for search? As I am still starting, I have read very basic reference available on some sites listed here on the forum, but found nothing about information objects "surface" Civil 3D for example through LISP. Maybe I have read little or in the wrong places.
    Last edited by frankjanuba715924; 2015-12-10 at 09:37 AM. Reason: Add information

  6. #6
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,500
    Login to Give a bone
    1

    Default Re: Doubt about using C # or LISP

    As always, within Visual Studio, Object Browser is your friend. Haha

    There's a lot of documentation in the SDK itself, however, you may also find this to be invaluable:

    http://docs.autodesk.com/CIV3D/2016/...ference_Guide/



    That said, you will learn a great deal from my friend who develops SincPac C3D as well:

    http://www.quuxsoft.com/



    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

  7. #7
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    1

    Default Re: Doubt about using C # or LISP

    A good definition of the problem helps. If I had known this was Civil3D objects rather than generic/mathematic "surface", "line", etc. then I would definitely recommend dotNET over LISP. You may stumble over additional problems as well. As I am fond of saying "Code is the end result, not the starting point". By solving the design issues up front you only need to deal with syntax and API limitations when writing the code.
    If you are going to fly by the seat of your pants, expect friction burns.
    Some say beauty is in the eye of the Beholder... perhaps so, but I've only seen the disintegration beam.
    Everyone else being wrong is not the same thing as being right.

  8. #8
    Member
    Join Date
    2015-12
    Posts
    9
    Login to Give a bone
    0

    Default Re: Doubt about using C # or LISP

    Thanks a lot, this links are very usefull!

  9. #9
    Programming Moderator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,500
    Login to Give a bone
    1

    Default Re: Doubt about using C # or LISP

    Quote Originally Posted by frankjanuba715924 View Post
    Thanks a lot, this links are very usefull!
    You're welcome; I'm happy to help.

    Not that this wouldn't apply to other topics, and there's obviously a learning curve (even for me), but particularly for topics of software development, try to be more descriptive when posing questions, providing as much clarity as you can - those of us who volunteer our time to help, can only do so with the information which is provided us - it will only help us to help you in the end.

    Cheers
    "How we think determines what we do, and what we do determines what we get."

    Sincpac C3D ~ Autodesk Exchange Apps

    Computer Specs:
    Dell Precision 3620, Core i7-7700K 4.2GHz, 64GB RAM, Samsung 970 Pro M.2, 8GB NVIDIA Quadro P4000

Similar Threads

  1. Doubt in iPart
    By Filipe Everly in forum Inventor - General
    Replies: 0
    Last Post: 2006-10-27, 06:34 PM
  2. Doubt in iAssembly
    By Filipe Everly in forum Inventor - General
    Replies: 0
    Last Post: 2006-10-27, 06:27 PM

Tags for this Thread

Posting Permissions

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