注册 登录
明经CAD社区 返回首页

qjchen的个人空间 http://www.mjtd.com/?250774 [收藏] [复制] [分享] [RSS]

日志

AutoCad 2021 对LISP的一些新改变

热度 6已有 1235 次阅读2020-4-9 22:21 |系统分类:应用

https://help.autodesk.com/view/OARX/2021/ENU/?guid=GUID-037BF4D4-755E-4A5C-8136-80E85CCEDF3E

这里给出了关于AUTOCAD 2021对于LISP的一些新的支持,已经很多年没有新增了。

主要变化:AutoCAD AutoLISP Extension for Visual Studio (VS) Code

这个变化让我都有点想升级CAD试试看了。

另外一个是增加了对Unicode的支持,虽然我也不怎么用到这个,但支持了总是好的。

拷贝记录一下

What's New or Changed with AutoLISP (AutoLISP)

The following is an overview of the changes made to AutoLISP in recent releases.

AutoCAD 2021

New
  • AutoCAD AutoLISP Extension for Visual Studio (VS) Code - Allows for the editing and debugging of AutoLISP files with VS Code on Windows or Mac OS. The LISPSYS system variable must to set to 1 or 2 in order to debug AutoLISP files with the AutoCAD AutoLISP Extension. When LISPSYS is set to 0, the legacy AutoLISP engine and Visual LISP IDE are used for editing and debugging AutoLISP files.
  • DCL support on Mac OS - Dialog boxes defined using DCL can now be displayed with AutoLISP. All DCL tiles supported on Windows are also supported on Mac OS, but not all tile attributes are supported on Mac OS.
Changed

These functions were updated to support Unicode character strings/codes:

  • ascii - Returns the conversion of the first character of a string into its Unicode character code (an integer).
  • chr - Converts an integer representing a Unicode character code into a single-character string.
  • load - Evaluates the AutoLISP expressions in a file.
  • open - Opens a file for access by the AutoLISP I/O functions. A new optional argument has been added which allows for the specification of the character encoding to be used when reading/writing the file. When the argument isn't provided, the file is assumed to contain a multibyte character set (MBCS) which is the legacy behavior.
  • read-char - Returns the integer representing the Unicode character read from the keyboard input buffer or from an open file.
  • read-line - Reads a string from the keyboard or from an open file, until an end-of-line marker is encountered.
  • strlen - Returns an integer that is the number of characters in a string.
  • substr - Returns a substring of a string.
  • vl-directory-files - Lists all files in a given directory.
  • vl-file-copy - Copies or appends the contents of one file to another file.
  • vl-file-delete - Deletes a file.
  • vl-file-directory-p - Determines if a file name refers to a directory.
  • vl-file-rename - Renames a file.
  • vl-file-size - Determines the size of a file, in bytes.
  • vl-file-systime - Returns last modification time of the specified file.
  • vl-filename-mktemp - Calculates a unique file name to be used for a temporary file.
  • vl-list->string - Combines the Unicode characters associated with a list of integers into a string.
  • vl-mkdir - Creates a directory.
  • vl-string->list - Converts a string into a list of Unicode character codes.
  • vl-string-elt - Returns the Unicode representation of the character at a specified position in a string.
  • vl-string-mismatch - Returns the length of the longest common prefix for two strings, starting at specified positions.
  • vl-string-position - Looks for a character with the specified Unicode code in a string.
  • vl-string-search - Searches for the specified pattern in a string.
  • vl-string-subst - Substitutes one string for another, within a string.
  • vl-string-translate - Replaces characters in a string with a specified set of characters.
  • vl-vbaload - Loads a VBA project.
  • vlisp-compile - Compiles AutoLISP source code into a FAS file.
  • write-char - Writes one Unicode character to the screen or an open file.
  • write-line - Writes a string to the screen or to an open file.
Obsolete
Visual LISP IDE (Windows Only) - The Visual LISP (VL) IDE has been retired and will be removed in a future release. It is recommended to use the AutoCAD AutoLISP Extension for Visual Studio (VS) Code creating new and updating existing AutoLISP programs. LISPSYS must be set to 0 before the VL IDE can be used to edit and debug AutoLISP files.

AutoCAD 2020

No new or changed functions.

AutoCAD 2019

No new or changed functions.

AutoCAD 2018

No new or changed functions.

AutoCAD 2017

No new or changed functions.

AutoCAD 2016

Changed

    osnap - Returns a 3D point that is the result of applying an Object Snap mode to a specified point. The function no longer accepts the qui mode. Using the qui mode results in a value of nil to be returned, even if other modes are specified.

Obsolete
  • getcfg - Retrieves application data from the AppData section of the acad20xx.cfg file.
  • setcfg - Writes application data to the AppData section of the acad20xx.cfg file.
Note: getcfg and setcfg are still available for compatibility, but might be removed in a future release. It is recommended to use the vl-registry-read and vl-registry-write functions as replacements.

AutoCAD 2015

No new or changed functions.

AutoCAD 2014

New
  • findtrustedfile - Searches the AutoCAD trusted file paths for the specified file.
  • showHTMLModalWindow - Displays a modal window with a HTML document; use in conjunction with the new JavaScript API.
Changed
  • findfile - Searches the AutoCAD support and trusted file paths. Function was updated to search the new trusted applications paths.

AutoCAD 2013

New
Obsolete

AutoCAD 2012

New
  • command-s - Executes an AutoCAD command and the supplied input.
  • *pop-error-mode* - Error-handling function that ends the previous call to *push-error-using-command* or *push-error-using-stack*.
  • *push-error-using-command* - Error-handling function that indicates the use of the command function within a custom *error* handler.
  • *push-error-using-stack* - Error-handling function that indicates the use of variables from the AutoLISP stack within a custom *error* handler.

AutoCAD 2011

New

AutoCAD 2010

Changes
  • help - Invokes the Help facility. Function was updated to add support for HTML documentation.

AutoCAD 2009

New




路过

雷人

握手
5

鲜花
1

鸡蛋

刚表态过的朋友 (6 人)

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号  
©2000-2020 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2020-11-1 00:54 , Processed in 0.245013 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.3

© 2001-2013 Comsenz Inc.

返回顶部