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?
|
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?
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.
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
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:".
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
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