TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Lee Mac on May 14, 2009, 08:08:52 AM
-
I am aware that quite a few of these "ACET-"... functions exist, but have no idea what they do as most are not documented in the ACAD help files.
Does anyone know where I can find information on such functions?
-
I think those are for express tools,
I had always tried to stay away from those as they are not installed on some machines.
-
AfraLisp.net (An Introduction to 'acetutil' Functions) (http://www.afralisp.net/lisp/acet-utils.htm)
-
Thanks guys,
I use them rarely, but just wanted to know what was available to me if I need it :-)
Thanks for your time,
Lee
-
Do a search on your computer for acetutil.chm (help file). If it's not there. I could get it to you.
-
I can't find that file Larry - but the link that ElpanovEvgeniy provided is brillant :-)
-
I think the link at Afralisp covers everything contained in the .chm file.
-
I had always tried to stay away from those as they are not installed on some machines.
this (http://www.theswamp.org/screens/mp/oh.gif)
-
this (http://www.theswamp.org/screens/mp/oh.gif)
this blows?? :?
-
ditto | repeat | what she said ...
-
While I agree with the idea these functions should not be depended on, the fact they are typically installed since I'm not sure what version makes them compelling given no other chioce.
Example, the SwapText routine I posted recently makes good use of the acet-sys-shift-down function. Of course the routine checks for whether the function is available.
Just my two cents...
-
While I agree with the idea these functions should not be depended on, the fact they are typically installed since I'm not sure what version makes them compelling given no other chioce.
Speaking of "no other choice" did you dump the notion of rolling your own (http://www.theswamp.org/index.php?topic=19644.msg239545#msg239545) or using George Harrison's arx (http://www.theswamp.org/index.php?topic=19644.msg239517#msg239517)?
-
Here's a comprehensive list of the ACET Functions, albeit dated from around 2008'ish.
For purposes of compatibility I also avoid using them, however I must admit, I can never resist the "ACET-PROGRESS" functions for a rather sexy progress bar.
-
While I agree with the idea these functions should not be depended on, the fact they are typically installed since I'm not sure what version makes them compelling given no other chioce.
Speaking of "no other choice" did you dump the notion of rolling your own (http://www.theswamp.org/index.php?topic=19644.msg239545#msg239545) or using George Harrison's arx (http://www.theswamp.org/index.php?topic=19644.msg239517#msg239517)?
Michael,
If I knew how to roll my own I would. I don't.
What I have is the ExpressTools option, and appently some ARX by George Harrison which you mentioned, and an ARX by Luis which does the same thing with the shift key. Given these choices, I'd rather depend on ET than have to include a separate ARX routine/file.
Joe
-
While I agree with the idea these functions should not be depended on, the fact they are typically installed since I'm not sure what version makes them compelling given no other chioce.
Speaking of "no other choice" did you dump the notion of rolling your own (http://www.theswamp.org/index.php?topic=19644.msg239545#msg239545) or using George Harrison's arx (http://www.theswamp.org/index.php?topic=19644.msg239517#msg239517)?
Michael,
If I knew how to roll my own I would. I don't.
What I have is the ExpressTools option, and appently some ARX by George Harrison which you mentioned, and an ARX by Luis which does the same thing with the shift key. Given these choices, I'd rather depend on ET than have to include a separate ARX routine/file.
Joe
Hola Jose.... George Harrison and me are the same persona :)
Edit: I just noticed that you don't want to have another dependency file for your program.
-
Luis my freind?
Is that you on the other end?
If so, I can't imagine why you would disguise your identity. It is after all your claim to fame.
Everyone within the programming community has benefitted by your generous wisdom.
Whatever drove you to this this point should be put in the shit can and ignored. Regardless of origin.
Regards
Joe
-
There is some news I donīt know ? Have the same questions as Lee. No documentation what it means all acet... !
-
If we want to be precise, there are two ACET-... functions that are now embedded in AutoCAD:
ACET-LAYERP-MARK ACET-LAYERP-MODE
Exploring (atoms-family ..) in my versions 2013 Mechanical I found some things
I do not remember anything about.
Does anyone know anything?
Comando: !_MATTS_UTIL
#<SUBR @0000000028998930 <EXRXSUBR>>
Comando: !PRAGMA
#<SUBR @000000002899d458 PRAGMA>
Comando: !VL-INFP
#<SUBR @000000000b452b10 VL-INFP>
Comando: (VL-NANP 0)
nil
-
Don't know of all those others, will have to investigate. From that vl-nanp's name I can only surmise it "should" have been something like a predicate to test if a value if Not-A-Number. But it seems to be broken - such predicates should not error out when they get other types of values in their parameters, especially if they're testing for something which "isn't".:
_$ (vl-nanp "1")
_$ (vl-nanp 0)
nil
_$ (vl-nanp t)
; error: bad argument type: numberp: T
_$ (vl-nanp 0.1)
nil_$ (vl-nanp (entlast))
_$ (vl-nanp '(1 2 3))
_$ (vl-nanp nil)
; error: bad argument type: numberp: nil
So sending a string / ename / list returns nothing, sending T / nil errors out. IMO less than useful!
Edit: Anyhow, if that is the correct reason behind the vl-nanp function it's quite simple to roll your own:
PPS: And anyway, why not use the built-in numberp in any case? Makes it even easier:
-
As for the _MATTS_UTIL, it seems to be something which tests if an attribute is a multi-line attrib. Returns T if sent the ename of a MAttrib, else returns nil.
Will do some more googling and/or hacking to see if I can get something on the rest of them.
-
vl-infp tests for reals exceeding the maxmimum storable value, e.g. for 32-bit Doubles:
pragma may be used to protect / unprotect symbols - there are many examples of its use if you search the forum.
-
You're correct, just found this: http://www.cadtutor.net/forum/showthread.php?61972-Oldie-but-a-Goodie-PRAGMA- (http://www.cadtutor.net/forum/showthread.php?61972-Oldie-but-a-Goodie-PRAGMA-)!
Thanks to RenderMan for that bit of info :kewl:
So the vl-infp means: predicate on infinity ;) . Thanks, was getting round to it I guess.
-
Another related thread:
http://www.theswamp.org/index.php?topic=40477 (http://www.theswamp.org/index.php?topic=40477)
-
You're correct, just found this: http://www.cadtutor.net/forum/showthread.php?61972-Oldie-but-a-Goodie-PRAGMA- (http://www.cadtutor.net/forum/showthread.php?61972-Oldie-but-a-Goodie-PRAGMA-)!
Thanks to RenderMan for that bit of info :kewl:
Cheers dude *Tips hat*
-
_MATTS_UTIL may do a bit more than that. It is used in burst.lsp:
(if (_MATTS_UTIL ANAME)
(progn
; Multiple Line Text Attributes (MATTS) -
; make an MTEXT entity from the MATTS data
(_MATTS_UTIL ANAME 1)
)
-
PPS: And anyway, why not use the built-in numberp in any case?
Your proposed alternatives to (vl-nanp) would not be the same thing. I'm not familiar with the (vl-nanp) function, but assuming its name implies its purpose, then it should only accept a floating point number as its argument, and it should only return T when that number is a NaN, which is a very specific floating point value that represents an otherwise unrepresentable numerical result of a calculation.
-
The vl-nanp function seems to be redundant since operations such as (/ 0 0), (sqrt -1) or (expt 0 0) in order to produce a NaN result will cause an error during evaluation so the result cannot be tested.
-
Lee, it may not be possible to produce a NaN from built-in functions, but I expect that non-built-in functions can return NaN (also, I don't think dividing by zero produces a NaN).
-
acetutil.help
http://www.findthatzipfile.com/search-8657303-hZIP/winrar-winzip-download-acetutil.zip.htm
-
also, I don't think dividing by zero produces a NaN
Dividing 0/0 should since as far as I know all indeterminate forms should return a NaN result.
-
Sorry, I'm not the mathematician you guys are - usually I've forgotten what I learnt around 15 years ago while doing Maths at university. A situation of use it or loose it :lmao:
Anyhow, it does seem as if Lee's on the money with 0/0: http://en.wikipedia.org/wiki/NaN (Oh why didn't I go look there before jumping the gun? :pissed: )
While divide by zero is defined as infinity (negative / positive), the 0/0 is a special case which is undefined. Thus it should be classed as "Not a Number".
Anyhow, in strictly AutoLisp code it's probably impossible to get to a NaN "number". At least without errors. Might be possible through some other external subroutines though. It seems even the CL hyperspec doesn't define such a predicate, though there is a sys:float-nan-p for some implementations defined as an extension function.