See the top rated post in this thread. Click here

Results 1 to 6 of 6

Thread: LM:

  1. #1
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default LM:

    What exactly is lm:
    I've tried to use lee macs codes that have lm: for functions vs. C: (command) with no success is it even a command?

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    1

    Default Re: LM:

    If functions not started with C: it means the function is a sub-function and you can call it wrapped with start and end parenthesis (LikeThis) if it does not require any arguments , but if arguments required , just feed it with the correct number of arguments and with the correct types .

    Good luck.

  3. #3
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    1

    Default Re: LM:

    Only LISP Defuns that have the 'c:' prefix are registered as Commands. Anything else, to include nothing at all, is not registered as a Command.

    The LM: prefix is Lee's 'signature', and is not a Command... This is similar to Autodesk's recommendation for Authorized developers to use their registered four character developer symbols.

    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 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

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

    Default Re: LM:

    Lets say we have a lot of LISP functions (and I mean a LOT). Eventually you'll run into problems with names that are the same e.g. GetLine for one purpose may not do exactly the same thing as GetLine for another purpose, but we need both and they can't have the same name - we need to use a different function name for each. But you don't want to stray too far from the purpose of the function or get cryptic (GetLine2 vs. GetLine4). So we use a prefix naming system.

    Lee uses "LM:" for most of his utilities. We have a large number of in-house utilities so use a rational system e.g. all of our math functions are prefixed with "math_lib:" while all of our list utility functions are prefixed with "list_handlers:".

  5. #5
    Past Vice President / AUGI Volunteer peter's Avatar
    Join Date
    2000-09
    Location
    Honolulu HI
    Posts
    1,109
    Login to Give a bone
    0

    Default Re: LM:

    Another alternative is make the functions local to your routine.

    The routine would define them, use them and dispose of them at runtime.

    Peter
    AutomateCAD

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: LM:

    Quote Originally Posted by peter View Post
    Another alternative is make the functions local to your routine.

    The routine would define them, use them and dispose of them at runtime.
    I do this for many of my routines... The routine itself is generally demand-loaded via AUTOLOAD statement, which expedites startup as fewer dependent sub-functions are required at AcadDoc.lsp... However, one could always demand-load the sub-function (libs?) from within the routine as well, they'd just sit in memory thereafter for each drawing (not usually an issue with today's RAM specs, etc. but still).

    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 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000

Posting Permissions

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