Author Topic: ACET... functions  (Read 7745 times)

0 Members and 1 Guest are viewing this topic.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
ACET... functions
« 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?

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8709
  • AKA Daniel
Re: ACET... functions
« Reply #1 on: May 14, 2009, 08:12:28 AM »
I think those are for express tools,
I had always tried to stay away from those as they are not installed on some machines.

ElpanovEvgeniy

  • Water Moccasin
  • Posts: 1569
  • Moscow (Russia)

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: ACET... functions
« Reply #3 on: May 14, 2009, 08:22:11 AM »
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

Gliderider

  • Guest
Re: ACET... functions
« Reply #4 on: May 14, 2009, 08:30:49 AM »
Do a search on your computer for acetutil.chm (help file). If it's not there. I could get it to you.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: ACET... functions
« Reply #5 on: May 14, 2009, 08:37:22 AM »
I can't find that file Larry - but the link that ElpanovEvgeniy  provided is brillant :-)

Gliderider

  • Guest
Re: ACET... functions
« Reply #6 on: May 14, 2009, 08:50:46 AM »
I think the link at Afralisp covers everything contained in the .chm file.

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ACET... functions
« Reply #7 on: May 14, 2009, 09:41:32 AM »
I had always tried to stay away from those as they are not installed on some machines.

this
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: ACET... functions
« Reply #8 on: May 14, 2009, 09:49:04 AM »
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ACET... functions
« Reply #9 on: May 14, 2009, 09:50:23 AM »
ditto | repeat | what she said ...
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Joe Burke

  • Guest
Re: ACET... functions
« Reply #10 on: May 14, 2009, 10:04:59 AM »
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...

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: ACET... functions
« Reply #11 on: May 14, 2009, 10:21:26 AM »
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 or using George Harrison's arx?
Engineering Technologist • CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com • http://cadanalyst.slack.com • http://linkedin.com/in/cadanalyst

Didge

  • Bull Frog
  • Posts: 211
Re: ACET... functions
« Reply #12 on: May 14, 2009, 11:14:02 AM »
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.
Think Slow......

Joe Burke

  • Guest
Re: ACET... functions
« Reply #13 on: May 14, 2009, 11:26:38 AM »
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 or using George Harrison's arx?

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

Spike Wilbury

  • Guest
Re: ACET... functions
« Reply #14 on: May 14, 2009, 11:41:09 AM »
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 or using George Harrison's arx?

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.
« Last Edit: May 14, 2009, 11:50:19 AM by George Harrison »

Joe Burke

  • Guest
Re: ACET... functions
« Reply #15 on: May 14, 2009, 12:35:27 PM »
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

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: ACET... functions
« Reply #16 on: February 01, 2013, 03:22:35 PM »
There is some news I don΄t know ? Have the same questions as Lee. No documentation what it means all acet... !

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: ACET... functions
« Reply #17 on: February 02, 2013, 03:12:11 AM »
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

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: ACET... functions
« Reply #18 on: February 02, 2013, 08:58:38 AM »
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".:
Code: [Select]
_$ (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:
Code - Auto/Visual Lisp: [Select]
  1. (defun nan-p (arg) (not (member (type arg) '(Int Real))))

PPS: And anyway, why not use the built-in numberp in any case? Makes it even easier:
Code - Auto/Visual Lisp: [Select]
  1. (defun nan-p (arg) (not (numberp arg)))
« Last Edit: February 02, 2013, 09:06:52 AM by irneb »
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: ACET... functions
« Reply #19 on: February 02, 2013, 09:15:14 AM »
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.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: ACET... functions
« Reply #20 on: February 02, 2013, 09:19:02 AM »
vl-infp tests for reals exceeding the maxmimum storable value, e.g. for 32-bit Doubles:

Code - Auto/Visual Lisp: [Select]
  1. _$ (vl-infp 1.7e308)
  2. nil
  3. _$ (vl-infp 1.8e308)
  4. T

pragma may be used to protect / unprotect symbols - there are many examples of its use if you search the forum.


irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: ACET... functions
« Reply #21 on: February 02, 2013, 09:21:37 AM »
You're correct, just found this: 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.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: ACET... functions
« Reply #22 on: February 02, 2013, 09:22:10 AM »

BlackBox

  • King Gator
  • Posts: 3770
Re: ACET... functions
« Reply #23 on: February 02, 2013, 09:34:18 AM »
You're correct, just found this: 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*
"How we think determines what we do, and what we do determines what we get."

hmspe

  • Bull Frog
  • Posts: 362
Re: ACET... functions
« Reply #24 on: February 02, 2013, 03:31:27 PM »
_MATTS_UTIL may do a bit more than that.  It is used in burst.lsp:
Code: [Select]
      (if (_MATTS_UTIL ANAME)
         (progn
            ; Multiple Line Text Attributes (MATTS) -
            ; make an MTEXT entity from the MATTS data
            (_MATTS_UTIL ANAME 1)
         )
"Science is the belief in the ignorance of experts." - Richard Feynman

owenwengerd

  • Bull Frog
  • Posts: 451
Re: ACET... functions
« Reply #25 on: February 02, 2013, 04:53:02 PM »
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.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: ACET... functions
« Reply #26 on: February 02, 2013, 06:43:57 PM »
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.
« Last Edit: February 02, 2013, 06:48:54 PM by Lee Mac »

owenwengerd

  • Bull Frog
  • Posts: 451
Re: ACET... functions
« Reply #27 on: February 02, 2013, 10:18:21 PM »
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).

HasanCAD

  • Swamp Rat
  • Posts: 1422

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: ACET... functions
« Reply #29 on: February 03, 2013, 08:40:13 AM »
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.

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: ACET... functions
« Reply #30 on: February 03, 2013, 09:36:48 AM »
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.
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.