Author Topic: New VL Function  (Read 9169 times)

0 Members and 2 Guests are viewing this topic.

daron

  • Guest
New VL Function
« on: October 23, 2003, 07:21:14 PM »
2004, it seems that ADesk hasn't totally left production of lisp on the shelf. Check this out:
Quote
Creates a directory

(vl-mkdir directoryname)

Arguments

directoryname

The name of the directory you want to create.

Return Values

T if successful, nil if the directory exists or if unsuccessful.

Examples

Create a directory named mydirectory:

_$ (vl-mkdir "c:\\mydirectory")
T

hendie

  • Guest
New VL Function
« Reply #1 on: October 24, 2003, 03:52:57 AM »
hmmnn ... useful

thanks for the tip

SMadsen

  • Guest
New VL Function
« Reply #2 on: October 24, 2003, 05:01:15 AM »
VL-MKDIR isn't a new function but documentation of it is new. Now we only need documentation for the other undocumented functions  :)

SMadsen

  • Guest
New VL Function
« Reply #3 on: October 24, 2003, 05:21:48 AM »
-> Here's one they could have documented:

Checks if a number exceeds the upper range of real numbers

(vl-infp num)

Arguments
Any number

Return values
T if number exceeds the range and would return #INF. Otherwise nil.

Examples
(vl-infp 1.79769313486e308)
nil
(vl-infp 1.79769313487e308)
T

(vl-infp (+ 1.79769313486e308 1.0e296))
nil
(vl-infp (+ 1.79769313486e308 1.0e297))
T

daron

  • Guest
New VL Function
« Reply #4 on: October 24, 2003, 10:07:32 AM »
What, are they trying to break us in easy? Give us the goods! We'll figure it out. How do you find these things, Stig? Of course, in Vertical Platform's the whole AEC object model wasn't documented, but is now with 2004.

SMadsen

  • Guest
New VL Function
« Reply #5 on: October 24, 2003, 10:21:35 AM »
How to find undocumented functions? Easiest way is to go into VLIDE, hit Ctrl-Shift-AŽand filter for the functions you want to look for. In case of VL- functions you just write VL- and hit the OK button.

There aren't much VL- functions not documented (at last). I think the complete list is:
VL-BT
VL-BT-OFF
VL-BT-ON
VL-INFP
VL-NANP
VL-INIT

... and some VLIDE settings stuff:
_ VL-BALANCE-PARENTHESIS
_VL-FAST-MODE
_VL-TIMES

Check out VLISP- functions, though. It's amazing how "easy" they made it to compile in VLIDE with all that documentation!   :lol:

daron

  • Guest
New VL Function
« Reply #6 on: October 24, 2003, 11:19:48 AM »
Okay, what's a BT for vl-bt? vl-nanp seems to be needing numbers, but every number I inputed returned nil. Will you explain the vlide setting stuff? The balance parenthesis looks good, but how would I use them.
Quote
Check out VLISP- functions, though. It's amazing how "easy" they made it to compile in VLIDE with all that documentation!

Wow, 23 vlisp functions.

Heh, what do you know about (vla-get-author)?

SMadsen

  • Guest
New VL Function
« Reply #7 on: October 24, 2003, 12:37:25 PM »
BT stands for Back-Trace. It traces the stack and prints it. Very useful debugging stuff!

VLA-GET-AUTHOR is to get the Author property in drawing properties:

Code: [Select]

(setq myDoc    (vla-get-activeDocument (vlax-get-acad-object))
      dwgProps (vla-get-summaryInfo)
      author   (vla-get-author)
)

(vlax-dump-dwgProps)

; IAcadSummaryInfo: IAcadSummaryInfo Interface
; Property values:
;   Author = "Not me! Him"
;   Comments = "You wouldn't want to know"
;   HyperlinkBase = ""
;   Keywords = ""
;   LastSavedBy = "Beats me"
;   RevisionNumber = "N/A"
;   Subject = "Ehh"
;   Title = "Ehhhh"


_VL-BALANCE-PARENTHESIS turns on/off the feature that makes the cursor jump for a split second to the opening parenthesis when typing a closing ditto. This has no effect on the parenthesis matching commands in Edit or the alert about suggesting to match paren's when formatting code. T=on, nil=off.

daron

  • Guest
New VL Function
« Reply #8 on: October 24, 2003, 12:57:48 PM »
Thanks Stig. Do you have a tutorial or anything on how to use the trace feature? I've never understood it.

SMadsen

  • Guest
New VL Function
« Reply #9 on: October 24, 2003, 01:11:15 PM »
Daron, there's an excellent explanation in VLIDE's own help reference. Starts at "Understanding the Trace Stack Window [AutoLISP Developer's Guide: ALG]" and runs some 7-8 pages.

daron

  • Guest
New VL Function
« Reply #10 on: October 24, 2003, 01:47:02 PM »
thanks again.