Đến nội dung


Hình ảnh
* * * - - 17 Bình chọn

Hỏi về Lisp (thuật toán, ý tưởng, coding,...)


  • Please log in to reply
2848 replies to this topic

#1041 Thaistreetz

Thaistreetz

    biết lệnh adcenter

  • Advance Member
  • PipPipPipPipPipPipPip
  • 903 Bài viết
Điểm đánh giá: 505 (tốt)

Đã gửi 01 January 2012 - 09:03 PM

bỏ hàm vlax-ename->vla-object đi. lỗi ở tất cả các hàm vlax-curve trong code trên chứ không fải chỉ riêng (vlax-curve-getParamAtPoint obj cen) bởi
đối số của các hàm vlax-curve là ename, không fải là vla-object
  • 0

Hình đã gửi
IN HIM, I TRUST. THE TRUST IN MY GOD


#1042 Doan Van Ha

Doan Van Ha

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 5447 Bài viết
Điểm đánh giá: 2624 (tuyệt vời)

Đã gửi 01 January 2012 - 09:23 PM

bỏ hàm vlax-ename->vla-object đi. lỗi ở tất cả các hàm vlax-curve trong code trên chứ không fải chỉ riêng (vlax-curve-getParamAtPoint obj cen) bởi
đối số của các hàm vlax-curve là ename, không fải là vla-object

Một số hàm vlax đối số có thể là ename hoặc vla-object. Bỏ đi hay không bỏ đi thì vẫn cứ lỗi trên bản vẽ đã post. Kết luận: lỗi ở tất cả hàm vlax-curve e không đúng.
  • 0

* Chỉ nên yêu cầu Lisp khi bạn làm việc đó mất cả ngày nhưng họ chỉ viết 1 giờ. Đừng nêu yêu cầu Lisp khi bạn chỉ làm 1 giờ nhưng bắt họ phải mất cả ngày.

* Nhờ viết lisp cũng như đi khám bệnh. Chỉ gởi căn cước và than sắp chết thì không bác sỹ nào cứu sống được.


#1043 Thaistreetz

Thaistreetz

    biết lệnh adcenter

  • Advance Member
  • PipPipPipPipPipPipPip
  • 903 Bài viết
Điểm đánh giá: 505 (tốt)

Đã gửi 01 January 2012 - 10:11 PM

Một số hàm vlax đối số có thể là ename hoặc vla-object. Bỏ đi hay không bỏ đi thì vẫn cứ lỗi trên bản vẽ đã post. Kết luận: lỗi ở tất cả hàm vlax-curve e không đúng.

Vậy thì đây là 1 trường hợp khó hiểu. lỗi do hàm (vlax-curve-getParamAtPoint obj cen) trả về nil => cen không nằm trên curve.
test lại bằng cách bắt điểm trực tiếp vào midpoint vẫn trả về nil: (vlax-curve-getParamAtPoint (car (entsel)) (osnap (getpoint) "_mid")) => trung điểm của đường thẳng này không nằm trên chính nó. ????????
Nếu dùng chuột kéo đầu hoặc đít của line đó qua chỗ khác thì lại trả về kết quả bình thường, mình nghĩ bạn có thể sử dụng code này bình thường bởi lẽ trường hợp đặc biệt như line này rất hiếm gặp. tôi có viết 1 chương trình rải taluy bình đồ, mỗi lần dùng nó vẽ ra cả nghìn đối tượng cũng chưa thấy gặp lỗi này bao giờ nên có thể an tâm.
  • 0

Hình đã gửi
IN HIM, I TRUST. THE TRUST IN MY GOD


#1044 ketxu

ketxu

    Copier - Paster - Editor

  • Moderator
  • PipPipPipPipPipPipPip
  • 5678 Bài viết
Điểm đánh giá: 2605 (tuyệt vời)

Đã gửi 01 January 2012 - 10:31 PM

Cad có nhiều cái khó hiểu lắm ^^

(defun C:HA( / obj len cen goc)
(setq obj (vlax-ename->vla-object (car (entsel))))
(setq len (vlax-curve-getDistAtParam obj (vlax-curve-getEndParam obj)))
(setq cen (vlax-curve-getPointAtDist obj (/ len 2.0)))
(setq cen (vlax-curve-getClosestPointToProjection obj cen (list 0 0 1)))
(setq goc (angle '(0 0 0) (vlax-curve-getFirstDeriv obj (vlax-curve-getParamAtPoint obj cen)))))

Ngoài ra, bác có thể dùng cách lấy FirstDeriv trong Help ^^
  • 1

Thành viên nhóm CadMagic.
Mời bạn ghé thăm facebook nhóm - Page viết lisp theo yêu cầu  :
CAD MAGIC


#1045 Doan Van Ha

Doan Van Ha

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 5447 Bài viết
Điểm đánh giá: 2624 (tuyệt vời)

Đã gửi 01 January 2012 - 10:56 PM

Việc lấy góc thì còn có cách khác, tôi có biết, tuy nhiên tôi đã lỡ dùng nó mà bị lỗi nên cố tìm cho ra (tham khảo lại tài nguyên thì thấy có 1 siêu lisp nước ngoài cũng dùng hàm lấy góc như vậy mà không thấy phản hồi gì???). Tôi có 1 nhận định hơi chủ quan tí: các hàm vlax-curve-get... rất phiêu lưu, bởi chí ít tôi cũng đã bị việt vị 2 lần trong khi viết lisp giúp người khác. Vì vậy mà cực nguy hiểm, nếu đã lỡ viết một chương trình dài hơi rồi mà lỗi kiểu này thì có nước tiêu tán đường! Và không biết còn bao nhiêu phiêu lưu nữa đang rình rập đây. Chán!!!
Thank Ket đã thêm 1 dòng code để sửa lỗi.
  • 0

* Chỉ nên yêu cầu Lisp khi bạn làm việc đó mất cả ngày nhưng họ chỉ viết 1 giờ. Đừng nêu yêu cầu Lisp khi bạn chỉ làm 1 giờ nhưng bắt họ phải mất cả ngày.

* Nhờ viết lisp cũng như đi khám bệnh. Chỉ gởi căn cước và than sắp chết thì không bác sỹ nào cứu sống được.


#1046 ketxu

ketxu

    Copier - Paster - Editor

  • Moderator
  • PipPipPipPipPipPipPip
  • 5678 Bài viết
Điểm đánh giá: 2605 (tuyệt vời)

Đã gửi 01 January 2012 - 11:14 PM

Việc lấy góc thì còn có cách khác, tôi có biết, tuy nhiên tôi đã lỡ dùng nó mà bị lỗi nên cố tìm cho ra (tham khảo lại tài nguyên thì thấy có 1 siêu lisp nước ngoài cũng dùng hàm lấy góc như vậy mà không thấy phản hồi gì???). Tôi có 1 nhận định hơi chủ quan tí: các hàm vlax-curve-get... rất phiêu lưu, bởi chí ít tôi cũng đã bị việt vị 2 lần trong khi viết lisp giúp người khác. Vì vậy mà cực nguy hiểm, nếu đã lỡ viết một chương trình dài hơi rồi mà lỗi kiểu này thì có nước tiêu tán đường! Và không biết còn bao nhiêu phiêu lưu nữa đang rình rập đây. Chán!!!
Thank Ket đã thêm 1 dòng code để sửa lỗi.

Ầy dà, siêu mấy thì siêu, chẳng qua là người ta chưa gặp lỗi đó thôi ^^ Thực ra cái phiêu lưu ở đây là hệ thống tọa độ UCS OCS WCS, 2D, 3D loạn xị ngậu. Cái này chắc phải phi sang Các lỗi thường gặp khi lập trình lisp
Code bác viết k vấn đề gì ở 2D, trường hợp bác gặp ở đây chắc chắn do chú màu xanh là hậu quả của việc giao ban từ đời 3D về 2D ^^
  • 0

Thành viên nhóm CadMagic.
Mời bạn ghé thăm facebook nhóm - Page viết lisp theo yêu cầu  :
CAD MAGIC


#1047 Doan Van Ha

Doan Van Ha

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 5447 Bài viết
Điểm đánh giá: 2624 (tuyệt vời)

Đã gửi 02 January 2012 - 07:47 AM

1. Nhờ Ket chuyển qua bên mục đó giùm được không? Khi post xong tôi cũng nghĩ vậy, nhưng lỡ rồi. Giờ thêm bến ấy nữa thì loãng CV, chuyển tốt hơn.
2. Tôi nghĩ không phải thằng màu xanh là hậu quả giao ban từ 3D và 2D. Trên bản vẽ của người ta gởi có hàng loạt đường nằm san sát nhau như thế (chắc vẽ cùng lần???), tôi chỉ trích 3 đường để ví dụ thôi. Hàng loạt đường nằm 2 bên nó thì chả sao cả. Ket hay tham vấn trên các web lisp uy tín, thử hỏi giùm xem sao hè, vì tôi english đặc!
  • 0

* Chỉ nên yêu cầu Lisp khi bạn làm việc đó mất cả ngày nhưng họ chỉ viết 1 giờ. Đừng nêu yêu cầu Lisp khi bạn chỉ làm 1 giờ nhưng bắt họ phải mất cả ngày.

* Nhờ viết lisp cũng như đi khám bệnh. Chỉ gởi căn cước và than sắp chết thì không bác sỹ nào cứu sống được.


#1048 hnhmai

hnhmai

    biết vẽ line

  • Members
  • PipPip
  • 23 Bài viết
Điểm đánh giá: 6 (bình thường)

Đã gửi 02 January 2012 - 09:45 AM

1. Nhờ Ket chuyển qua bên mục đó giùm được không? Khi post xong tôi cũng nghĩ vậy, nhưng lỡ rồi. Giờ thêm bến ấy nữa thì loãng CV, chuyển tốt hơn.
2. Tôi nghĩ không phải thằng màu xanh là hậu quả giao ban từ 3D và 2D. Trên bản vẽ của người ta gởi có hàng loạt đường nằm san sát nhau như thế (chắc vẽ cùng lần???), tôi chỉ trích 3 đường để ví dụ thôi. Hàng loạt đường nằm 2 bên nó thì chả sao cả. Ket hay tham vấn trên các web lisp uy tín, thử hỏi giùm xem sao hè, vì tôi english đặc!


Tôi thay biến cen của Bác bằng (OSNAP cen "_NEAR") thì không có lỗi. Chắc là do độ chính xác của các phép tính.
  • 0

#1049 Doan Van Ha

Doan Van Ha

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 5447 Bài viết
Điểm đánh giá: 2624 (tuyệt vời)

Đã gửi 02 January 2012 - 10:00 AM

Đã phát hiện ra sự khác nhau giữa 2 đường Line này. Có lẽ đường đỏ được vẽ từ Cad, đường xanh sinh ra từ 1 phần mềm nào đó nên DXF của chúng khác nhau.
Trích dẫn:
1). Đường đỏ:
(
(-1 . <Entity name: 7efad8c8>)
(0 . "LINE")
(330 . <Entity name: 7efa9cc0>)
(5 . "52469")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "ranhdoc")
(62 . 1)
(100 . "AcDbLine")
(10 602087.0 1.63698e+006 0.0)
(11 602060.0 1.63695e+006 0.0)
(210 0.0 0.0 1.0)
)

2). Đường xanh:
(
(-1 . <Entity name: 7efad8c0>)
(0 . "LINE")
(330 . <Entity name: 7efa9cc0>)
(5 . "52468")
(100 . "AcDbEntity")
(67 . 0)
(410 . "Model")
(8 . "LAYER8")
(6 . "Continuous")
(370 . 0)

(100 . "AcDbLine")
(10 602099.0 1.63697e+006 0.0)
(11 602064.0 1.63695e+006 0.0)
(210 0.0 0.0 1.0)
)
  • 0

* Chỉ nên yêu cầu Lisp khi bạn làm việc đó mất cả ngày nhưng họ chỉ viết 1 giờ. Đừng nêu yêu cầu Lisp khi bạn chỉ làm 1 giờ nhưng bắt họ phải mất cả ngày.

* Nhờ viết lisp cũng như đi khám bệnh. Chỉ gởi căn cước và than sắp chết thì không bác sỹ nào cứu sống được.


#1050 ketxu

ketxu

    Copier - Paster - Editor

  • Moderator
  • PipPipPipPipPipPipPip
  • 5678 Bài viết
Điểm đánh giá: 2605 (tuyệt vời)

Đã gửi 02 January 2012 - 10:24 AM

@ bác ĐVH : dòng code e thêm vào để chuyển điểm về cùng mặt phẳng với Obj (có vecto pháp tuyến (0 0 1)
3 mã dxf trên k liên quan gì ạ ^^
(61 : color , 6 : linetype , 370 : lineWeight)
  • 1

Thành viên nhóm CadMagic.
Mời bạn ghé thăm facebook nhóm - Page viết lisp theo yêu cầu  :
CAD MAGIC


#1051 Thaistreetz

Thaistreetz

    biết lệnh adcenter

  • Advance Member
  • PipPipPipPipPipPipPip
  • 903 Bài viết
Điểm đánh giá: 505 (tốt)

Đã gửi 02 January 2012 - 09:07 PM

các bác có hàm nào đề gọi hộp thoại edit plotstyle không cho mình xin. <_<
Edit: mình mò được rồi. dùng startapp
  • 0

Hình đã gửi
IN HIM, I TRUST. THE TRUST IN MY GOD


#1052 gia_bach

gia_bach

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 1431 Bài viết
Điểm đánh giá: 1425 (rất tốt)

Đã gửi 03 January 2012 - 11:08 AM

Tôi sử dụng lisp dưới đây để tính góc của tiếp tuyến với curve tại điểm giữa của curve, nhưng trong file cad đính kèm thì nó bị lỗi (đường màu xanh). Tôi biết lỗi ở hàm (vlax-curve-getParamAtPoint obj cen) nhưng không hiểu vì sao mà lỗi, và cách khắc phục. Ai biết xin chỉ giùm.
http://www.cadviet.c...29_loi_vlax.dwg


(defun C:HA( / obj len cen goc)
(setq obj (vlax-ename->vla-object (car (entsel))))
(setq len (vlax-curve-getDistAtParam obj (vlax-curve-getEndParam obj)))
(setq cen (vlax-curve-getPointAtDist obj (/ len 2)))
(setq goc (angle '(0 0 0) (vlax-curve-getFirstDeriv obj (vlax-curve-getParamAtPoint obj cen)))))

Lỗi này do sai số phát sinh khi gọi hàm vlax-curve-getPointAtDist.
Do hàm (vlax-curve-getParamAtPoint curve pt) yêu cầu điểm pt phải thuộc Curve.
Nhưng do sai số của hàm (vlax-curve-getPointAtDist curve (/ len 2)) nên điểm trả về có thể thuộc hoặc không thuộc Curve.
Tùy từng trường hợp cụ thể, nếu sai số này đủ lớn thì CAD báo lỗi.

Cách khắc phục :
1.) như Ketxu đề nghị : (vlax-curve-getClosestPointToProjection obj cen (list 0 0 1))
hoặc chỉ đơn giản là lấy điểm gần nhất trên curve : (vlax-curve-getClosestPointTo obj cen)

2.) Hoặc cách tránh lỗi sai số khi gọi hàm vlax-curve-getPointAtDist là ... không dùng nó nữa. :o
Cad cung cấp 1 hàm khác để lấy tham số param của Curve là : (vlax-curve-getParamAtDist obj dis)
(Dĩ nhiên dis phải nhỏ hơn hoặc bằng chiều dài của curve)
Do đó lisp trên có thể viết lại như sau :

(defun C:HA1( / obj len goc)
(setq obj (vlax-ename->vla-object (car (entsel))))
(setq len (vlax-curve-getDistAtParam obj (vlax-curve-getEndParam obj)) )
(setq goc (angle '(0 0 0) (vlax-curve-getFirstDeriv obj (vlax-curve-getParamAtDist obj (/ len 2))))))

  • 2

#1053 Doan Van Ha

Doan Van Ha

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 5447 Bài viết
Điểm đánh giá: 2624 (tuyệt vời)

Đã gửi 13 January 2012 - 08:26 PM

Ai biết xin chỉ giùm: làm sao để lấy giá trị của tất cả các biến hệ thống của 1 bản vẽ?
  • 0

* Chỉ nên yêu cầu Lisp khi bạn làm việc đó mất cả ngày nhưng họ chỉ viết 1 giờ. Đừng nêu yêu cầu Lisp khi bạn chỉ làm 1 giờ nhưng bắt họ phải mất cả ngày.

* Nhờ viết lisp cũng như đi khám bệnh. Chỉ gởi căn cước và than sắp chết thì không bác sỹ nào cứu sống được.


#1054 Detailing

Detailing

    biết lệnh imageclip

  • Members
  • PipPipPipPipPipPipPip
  • 667 Bài viết
Điểm đánh giá: 278 (khá)

Đã gửi 13 January 2012 - 10:24 PM

Ai biết xin chỉ giùm: làm sao để lấy giá trị của tất cả các biến hệ thống của 1 bản vẽ?

lập 1 list tất cả sysvar rồi lặp qua hết là lấy dc thôi :)

tham khảo Sysvar của AutoCAD 2000

AutoCAD 2000
System Variables
A
ACADLSPASDOC Controls whether AutoCAD loads the acad.lsp file into every drawing or just the first drawing opened in an AutoCAD session
ACADPREFIX Stores the directory path, if any, specified by the ACAD environment variable, with path separators appended if necessary
ACADVER Stores the AutoCAD version number
ACISOUTVER Controls the ACIS version of SAT files created using the ACISOUTcommand
AFLAGS Sets attribute flags for ATTDEF bit-code
ANGBASE Sets the base angle 0 with respect to the current UCS
ANGDIR Sets the positive angle direction from angle 0 with respect to the current UCS
APBOX Turns the AutoSnap aperture box on or off
APERTURE Sets object snap target height, in pixels
AREA Stores the last area computed by AREA, LIST, or DBLIST
ATTDIA Controls whether -INSERT uses a dialog box for attribute value entry
ATTMODE Controls display of attributes
ATTREQ Determines whether INSERT uses default attribute settings during insertion of blocks
AUDITCTL Controls whether AUDIT creates an audit report (ADT) file
AUNITS Sets units for angles
AUPREC Sets the number of decimal places for angular units
AUTOSNAP Controls AutoSnap marker, tooltip, and magnet
B
BACKZ Stores the back clipping plane offset from the target plane for the current viewport
BINDTYPE Controls how xref names are handled when binding xrefs or editing xrefs in-place
BLIPMODE Controls whether marker blips are visible
C
CDATE Sets calendar date and time
CECOLOR Sets the color of new objects
CELTSCALE Sets the current object linetype scaling factor
CELTYPE Sets the linetype of new objects
CELWEIGHT Sets the lineweight of new objects
CHAMFERA Sets the first chamfer distance
CHAMFERB Sets the second chamfer distance
CHAMFERC Sets the chamfer length
CHAMFERD Sets the chamfer angle
CHAMMODE Sets the input method by which AutoCAD creates chamfers
CIRCLERAD Sets the default circle radius
CLAYER Sets the current layer
CMDACTIVE Stores the bit-code that indicates whether an ordinary command, transparent command, script, or dialog box is active
CMDECHO Controls whether AutoCAD echoes prompts and input during the AutoLISP (command) function
CMDNAMES Displays the names of the active and transparent commands
CMLJUST Specifies multiline justification
CMLSCALE Controls the overall width of a multiline
CMLSTYLE Sets the multiline style
COMPASS Controls whether the 3D compass is on or off in the current viewport
COORDS Controls when coordinates are updated on the status line
CPLOTSTYLE Controls the current plot style for new objects
CPROFILE Stores the name of the current profile
CTAB Returns the name of the current (model or layout) tab in the drawing. Provides a means for the user to determine which tab is active
CURSORSIZE Determines the size of the crosshairs as a percentage of the screen size
CVPORT Sets the identification number of the current viewport
D
DATE Stores the current date and time
DBMOD Indicates the drawing modification status using bit-code
DCTCUST Displays the path and file name of the current custom spelling dictionary
DCTMAIN Displays the file name of the current main spelling dictionary
DEFLPLSTYLE Specifies the default plot style for new layers
DEFPLSTYLE Specifies the default plot style for new objects
DELOBJ Controls whether objects used to create other objects are retained or deleted from the drawing database
DEMANDLOAD Specifies if and when AutoCAD demand loads a third-party application if a drawing contains custom objects created in that application
DIASTAT Stores the exit method of the most recently used dialog box
DIMADEC Controls the number of places of precision displayed for angular dimensions
DIMALT Controls the display of alternate units in dimensions
DIMALTD Controls the number of decimal places in alternate units
DIMALTF Controls the multiplier for alternate units
DIMALTRND Determines rounding of alternate units
DIMALTTD Sets the number of decimal places for the tolerance values in the alternate units of a dimension
DIMALTTZ Toggles suppression of zeros in tolerance values
DIMALTU Sets the units format for alternate units of all dimension style family members except angular
DIMALTZ Controls the suppression of zeros for alternate unit dimension values
DIMAPOST Specifies a text prefix or suffix (or both) to the alternate dimension measurement for all types of dimensions except angular
DIMASO Controls the associativity of dimension objects
DIMASZ Controls the size of dimension line and leader line arrowheads
DIMATFIT Determines how dimension text and arrows are arranged when space is not sufficient to place both within the extension lines
DIMAUNIT Sets the units format for angular dimensions
DIMAZIN Suppresses zeros for angular dimensions
DIMBLK Sets the arrowhead block displayed at the ends of dimension lines or leader lines
DIMBLK1 Sets the arrowhead for the first end of the dimension line when DIMSAH is on
DIMBLK2 Sets the arrowhead for the second end of the dimension line when DIMSAH is on
DIMCEN Controls drawing of circle or arc center marks and centerlines by DIMCENTER, DIMDIAMETER, and DIMRADIUS
DIMCLRD Assigns colors to dimension lines, arrowheads, and dimension leader lines
DIMCLRE Assigns colors to dimension extension lines
DIMCLRT Assigns colors to dimension text
DIMDEC Sets the number of decimal places displayed for the primary units of a dimension
DIMDLE Sets the distance the dimension line extends beyond the extension line when oblique strokes are drawn instead of arrowheads
DIMDLI Controls the spacing of dimension lines in baseline dimensions
DIMDSEP Specifies a single character decimal separator to use when creating dimensions whose unit format is decimal
DIMEXE Specifies how far to extend the extension line beyond the dimension line
DIMEXO Specifies how far extension lines are offset from origin points
DIMFIT Obsolete. Replaced by DIMATFIT and DIMTMOVE
DIMFRAC Sets the fraction format when DIMLUNIT is set to 4 or 5
DIMGAP Sets the distance around the dimension text when the dimension line breaks to accommodate dimension text
DIMJUST Controls the horizontal positioning of dimension text
DIMLDRBLK Specifies the arrow type for leaders
DIMLFAC Sets a scale factor for linear dimension measurements
DIMLIM Generates dimension limits as the default text
DIMLUNIT Sets units for all dimension types except Angular
DIMLWD Assigns lineweight to dimension lines
DIMLWE Assigns lineweight to extension lines
DIMPOST Specifies a text prefix or suffix (or both) to the dimension measurement
DIMRND Rounds all dimensioning distances to the specified value
DIMSAH Controls the display of dimension line arrowhead blocks
DIMSCALE Sets the overall scale factor applied to dimensioning variables that specify sizes, distances, or offsets
DIMSD1 Controls suppression of the first dimension line
DIMSD2 Controls suppression of the second dimension line
DIMSE1 Suppresses display of the first extension line
DIMSE2 Suppresses display of the second extension line
DIMSHO Controls redefinition of dimension objects while dragging
DIMSOXD Suppresses drawing of dimension lines outside the extension lines
DIMSTYLE Shows the current dimension style
DIMTAD Controls the vertical position of text in relation to the dimension line
DIMTDEC Sets the number of decimal places to display in tolerance values for the primary units in a dimension
DIMTFAC Sets a scale factor used to calculate the height of text for dimension fractions and tolerances
DIMTIH Controls the position of dimension text inside the extension lines for all dimension types except ordinate
DIMTIX Draws text between extension lines
DIMTM When DIMTOL or DIMLIM is on, sets the minimum (or lower) tolerance limit for dimension text
DIMTMOVE Sets dimension text movement rules
DIMTOFL Controls whether a dimension line is drawn between the extension lines even when the text is placed outside
DIMTOH Controls the position of dimension text outside the extension lines
DIMTOL Appends tolerances to dimension text
DIMTOLJ Sets the vertical justification for tolerance values relative to the nominal dimension text
DIMTP When DIMTOL or DIMLIM is on, sets the maximum (or upper) tolerance limit for dimension text
DIMTSZ Specifies the size of oblique strokes drawn instead of arrowheads for linear, radius, and diameter dimensioning
DIMTVP Controls the vertical position of dimension text above or below the dimension line
DIMTXSTY Specifies the text style of the dimension
DIMTXT Specifies the height of dimension text, unless the current text style has a fixed height
DIMTZIN Controls the suppression of zeros in tolerance values
DIMUNIT Obsolete. Replaced by DIMLUNIT and DIMFRAC
DIMUPT Controls options for user-positioned text
DIMZIN Controls the suppression of zeroes in the primary unit value
DISPSILH Controls display of silhouette curves of solid objects in Wireframe mode
DISTANCE Stores the distance computed by DIST
DONUTID Sets the default for the inside diameter of a donut
DONUTOD Sets the default for the outside diameter of a donut
DRAGMODE Controls the display of objects being dragged
DRAGP1 Sets the regen-drag input sampling rate
DRAGP2 Sets the fast-drag input sampling rate
DWGCHECK Determines whether a drawing was last edited by a product other than AutoCAD
DWGCODEPAGE Stores the same value as SYSCODEPAGE (for compatibility reasons)
DWGNAME Stores the drawing name as entered by the user
DWGPREFIX Stores the drive/directory prefix for the drawing
DWGTITLED Indicates whether the current drawing has been named
"Hurricane has been one of the best products I have run across. I never had the time to create scripts, but I new they could be a time saver. I use it for some simple tasks, like putting dates on shop drawings, but the amount of time it saves me has been fantastic. And the couple of times I have emailed tech support with questions, the response has been rapid and with an answer I could understand easily.
Thanks Hurricane for such a great product.".
- Randy Godwin Drafting Services ( website )
View All | Click to add your testimonial
Click here for main site.
E
EDGEMODE Controls how TRIM and EXTEND determine cutting and boundary edges
ELEVATION Stores the current elevation relative to the current UCS for the current viewport in the current space
EXPERT Controls whether certain prompts are issued
EXPLMODE Controls whether EXPLODE supports nonuniformly scaled (NUS) blocks
EXTMAX Stores the upper-right point of the drawing extents
EXTMIN Stores the lower-left point of the drawing extents
EXTNAMES Sets the parameters for named object names (such as linetypes and layers) stored in symbol tables
F
FACETRATIO Controls the aspect ratio of faceting for cylindrical and conic ACIS solids
FACETRES Adjusts the smoothness of shaded and rendered objects and objects with hidden lines removed
FILEDIA Suppresses display of the file dialog boxes
FILLETRAD Stores the current fillet radius
FILLMODE Specifies whether multilines, traces, solids, all hatches (including solid-fill), and wide polylines are filled in
FONTALT Specifies the alternate font to be used when the specified font file cannot be located
FONTMAP Specifies the font mapping file to be used
FRONTZ Stores the front clipping plane offset from the target plane for the current viewport
FULLOPEN Indicates whether the current drawing is partially open
G
GRIDMODE Specifies whether the grid is turned on or off
GRIDUNIT Specifies the grid spacing (X and Y) for the current viewport
GRIPBLOCK Controls the assignment of grips in blocks
GRIPCOLOR Controls the color of nonselected grips (drawn as box outlines)
GRIPHOT Controls the color of selected grips (drawn as filled boxes)
GRIPS Controls the use of selection set grips for the Stretch, Move, Rotate, Scale, and Mirror grip modes
GRIPSIZE Sets the size of the grip box in pixels
H
HANDLES Reports whether object handles can be accessed by applications
HIDEPRECISION Controls the accuracy of hides and shades
HIGHLIGHT Controls object highlighting; does not affect objects selected with grips
HPANG Specifies the hatch pattern angle
HPBOUND Controls the object type created by BHATCH and BOUNDARY
HPDOUBLE Specifies hatch pattern doubling for user-defined patterns
HPNAME Sets a default hatch pattern name
HPSCALE Specifies the hatch pattern scale factor
HPSPACE Specifies the hatch pattern line spacing for user-defined simple patterns
HYPERLINKBASE Specifies the path used for all relative hyperlinks in the drawing
I
IMAGEHLT Controls whether the entire raster image or only the raster image frame is hightlighted
INDEXCTL Controls whether layer and spatial indexes are created and saved in drawing files
INETLOCATION Stores the Internet location used by BROWSER and the Browse the Web dialog box
INSBASE Stores insertion base point set by BASE
INSNAME Sets a default block name for INSERT
INSUNITS When you drag a block from AutoCAD DesignCenter, specifies a drawing units value
INSUNITSDEFSOURCE Sets source content units value
INSUNITSDEFTARGET Sets target drawing units value
ISAVEBAK Improves the speed of incremental saves, especially for large drawings
ISAVEPERCENT Determines the amount of wasted space tolerated in a drawing file
ISOLINES Specifies the number of isolines per surface on objects
L
LASTANGLE Stores the end angle of the last arc entered
LASTPOINT Stores the last point entered
LASTPROMPT Stores the last string echoed to the command line
LENSLENGTH Stores the length of the lens (in millimeters) used in perspective viewing for the current viewport
LIMCHECK Controls the creation of objects outside the drawing limits
LIMMAX Stores the upper-right drawing limits for the current space
LIMMIN Stores the lower-left drawing limits for the current space
LISPINIT When single-document interface is enabled, specifies whether AutoLISP-defined functions and variables are preserved when you open a new drawing
LOCALE Displays the ISO language code of the current AutoCAD version
LOGFILEMODE Specifies whether the contents of the text window are written to a log file
LOGFILENAME Specifies the path and name of the log file
LOGFILEPATH Specifies the path for the log files for all drawings in a session
LOGINNAME Displays the user's name as configured or as input when AutoCAD is loaded
LTSCALE Sets the global linetype scale factor
LUNITS Sets linear units
LUPREC Sets the number of decimal places displayed for linear units
LWDEFAULT Sets the value for the default linweight
LWDISPLAY Controls whether the lineweight is displayed in the Model or Layout tab
LWUNITS Controls whether lineweight units are displayed in inches or millimeters
M
MAXACTVP Sets the maximum number of viewports that can be active at one time in the display
MAXSORT Sets the maximum number of symbol names or block names sorted by listing commands
MBUTTONPAN Controls the behavior of the third button or wheel on the pointing device
MEASUREINIT Sets the initial drawing units as English or metric
MEASUREMENT Sets drawing units as English or metric for the current drawing only
MENUCTL Controls the page switching of the screen menu
MENUECHO Sets menu echo and prompt control bits
MENUNAME Stores the menu file name, including the path for the filename
MIRRTEXT Controls how MIRROR reflects text
MODEMACRO Displays a text string on the status line
MTEXTED Sets the primary and secondary text editors to use for multiline text objects
N
NOMUTT Suppresses the message display (muttering) when it wouldn't normally be suppressed
O
OFFSETDIST Sets the default offset distance
OFFSETGAPTYPE Controls how to offset polylines when a gap is created as a result of offsetting the individual polyline segments
OLEHIDE Controls the display of OLE objects in AutoCAD
OLEQUALITY Controls the default quality level for embedded OLE objects
OLESTARTUP Controls whether the source application of an embedded OLE object loads when plotting
ORTHOMODE Constrains cursor movement to the perpendicular
OSMODE Sets running object snap modes using bitcodes
OSNAPCOORD Controls whether coordinates entered on the command line override running object snaps
"Hurricane has been one of the best products I have run across. I never had the time to create scripts, but I new they could be a time saver. I use it for some simple tasks, like putting dates on shop drawings, but the amount of time it saves me has been fantastic. And the couple of times I have emailed tech support with questions, the response has been rapid and with an answer I could understand easily.
Thanks Hurricane for such a great product.".
- Randy Godwin Drafting Services ( website )
View All | Click to add your testimonial
Click here for main site.
P
PAPERUPDATE Controls the display of a warning dialog when attempting to print a layout with a paper size different from the paper size specified by the default for the plotter configuration file
PDMODE Controls how point objects are displayed
PDSIZE Sets the display size for point objects
PERIMETER Stores the last perimeter value computed by AREA, LIST, or DBLIST
PFACEVMAX Sets the maximum number of vertices per face
PICKADD Controls whether subsequent selections replace the current selection set or add to it
PICKAUTO Controls automatic windowing at the Select Objects prompt
PICKBOX Sets object selection target height
PICKDRAG Controls the method of drawing a selection window
PICKFIRST Controls whether you select objects before or after you issue a command
PICKSTYLE Controls the use of group selection and associative hatch selection
PLATFORM Indicates which platform of AutoCAD is in use
PLINEGEN Sets how linetype patterns generate around the vertices of a 2D polyline
PLINETYPE Specifies whether AutoCAD uses optimized 2D polylines
PLINEWID Stores the default polyline width
PLOTID Obsolete, has no effect in AutoCAD 2000 except to preserve the integrity of pre-AutoCAD 2000 scripts and LISP routines
PLOTROTMODE Controls the orientation of plots
PLOTTER Obsolete. Has no effect in AutoCAD 2000 except to preserve the integrity of pre-AutoCAD 2000 scripts and LISP routines
PLQUIET Controls the display of optional dialog boxes and nonfatal errors for batch plotting and scripts
POLARADDANG Contains user-defined polar angles
POLARANG Sets the polar angle increment
POLARDIST Sets the snap increment when the SNAPSTYL system variable is set to 1 (polar snap)
POLARMODE Controls settings for polar and object snap tracking
POLYSIDES Sets the default number of sides for POLYGON
POPUPS Displays the status of the currently configured display driver
PRODUCT Returns the product name
PROGRAM Returns the program name
PROJECTNAME Assigns a project name to the current drawing
PROJMODE Sets the current Projection mode for trimming or extending
PROXYGRAPHICS Specifies whether images of proxy objects are saved in the drawing
PROXYNOTICE Displays a notice when you open a drawing containing custom objects created by an application that is not present
PROXYSHOW Controls the display of proxy objects in a drawing
PSLTSCALE Controls paper space linetype scaling
PSPROLOG Assigns a name for a prolog section to be read from the acad.psf file when you are using PSOUT
PSQUALITY Controls the rendering quality of PostScript images
PSTYLEMODE Indicates whether the current drawing is in a Color-Dependent or Named Plot Style mode
PSTYLEPOLICY Controls whether an object's color property is associated with its plot style
PSVPSCALE Sets the view scale factor for all newly created viewports
PUCSBASE Stores the name of the UCS that defines the origin and orientation of orthographic UCS settings in paper space only
Q
QTEXTMODE Controls how text is displayed
R
RASTERPREVIEW Controls whether BMP preview images are saved with the drawing
REFEDITNAME Indicates whether a drawing is in a reference-editing state and stores the reference file name
REGENMODE Controls automatic regeneration of the drawing
RE-INIT Reinitializes the digitizer, digitizer port, and acad.pgp file
RTDISPLAY Controls the display of raster images during Realtime ZOOM or PAN
S
SAVEFILE Stores the current auto-save file name
SAVEFILEPATH Specifies the path to the directory for all automatic save files for the AutoCAD session.
SAVENAME Stores the file name and directory path of the current drawing after you save it
SAVETIME Sets the automatic save interval, in minutes
SCREENBOXES Stores the number of boxes in the screen menu area of the drawing area
SCREENMODE Stores a bitcode indicating the graphics/text state of the AutoCAD display
SCREENSIZE Stores current viewport size in pixels (X and Y)
SDI Controls whether AutoCAD runs in single- or multiple-document interface
SHADEDGE Controls the shading of edges in rendering
SHADEDIF Sets the ratio of diffuse reflective light to ambient light
SHORTCUTMENU Controls whether Default, Edit, and Command mode shortcut menus are available in the drawing area
SHPNAME Sets a default shape name
SKETCHINC Sets the record increment for SKETCH
SKPOLY Determines whether SKETCH generates lines or polylines
SNAPANG Sets snap and grid rotation angle for the current viewport
SNAPBASE Sets the snap and grid origin point for the current viewport relative to the current UCS
SNAPISOPAIR Controls the isometric plane for the current viewport
SNAPMODE Turns Snap mode on and off
SNAPSTYL Sets snap style for the current viewport
SNAPTYPE Sets the snap style for the current viewport
SNAPUNIT Sets the snap spacing for the current viewport
SOLIDCHECK Turns the solid validation on and off for the current AutoCAD session
SORTENTS Controls the OPTIONS command (from the Selection tab) object sort order operations
SPLFRAME Controls the display of splines and spline-fit polylines
SPLINESEGS Sets the number of line segments to be generated for each spline-fit polyline
SPLINETYPE Sets the type of curve generated by the Spline option of the PEDIT command
SURFTAB1 Sets the number of tabulations to be generated for RULESURF and TABSURF
SURFTAB2 Sets the mesh density in the N direction for REVSURF and EDGESURF
SURFTYPE Controls the type of surface-fitting to be performed by the Smooth option of the PEDIT command
SURFU Sets the surface density for PEDIT Smooth in the M direction
SURFV Sets the surface density for PEDIT Smooth in the N direction
SYSCODEPAGE Indicates the system code page specified in acad.xmf
T
TABMODE Controls the use of the tablet
TARGET Stores the location of the target point for the current viewport
TDCREATE Stores the local time and date the drawing was created
TDINDWG Stores the total editing time
TDUCREATE Stores the universal time and date the drawing was created
TDUPDATE Stores the local time and date of the last update/save
TDUSRTIMER Stores the user-elapsed timer
TDUUPDATE Stores the universal time and date of the last update/save
TEMPPREFIX Contains the directory name for temporary files
TEXTEVAL Controls the method of evaluation for text strings
TEXTFILL Controls the filling of TrueType fonts while plotting, exporting with the PSOUT command, and rendering
TEXTQLTY Sets the resolution tesselation fineness of text outlines for TrueType fonts while plotting, exporting with the PSOUT command, and rendering
TEXTSIZE Sets the default height for new text objects drawn with the current text style
TEXTSTYLE Sets the name of the current text style
THICKNESS Sets the current 3D solid thickness
TILEMODE Makes the Model tab or the last layout tab current
TOOLTIPS Controls the display of tooltips
TRACEWID Sets the default trace width
TRACKPATH Controls the display of polar and object snap tracking alignment paths
TREEDEPTH Specifies the maximum depth, that is, the number of times the tree-structured spatial index can divide into branches
TREEMAX Limits memory consumption during drawing regeneration by limiting the number of nodes in the spatial index (oct-tree)
TRIMMODE Controls whether AutoCAD trims selected edges for chamfers and fillets
TSPACEFAC Controls the multiline text line spacing distance measured as a factor of text height
TSPACETYPE Controls the type of line spacing used in multiline text
TSTACKALIGN Controls the vertical alignment of stacked text
TSTACKSIZE Controls the percentage of stacked text fraction height relative to selected text's current height
"Hurricane has been one of the best products I have run across. I never had the time to create scripts, but I new they could be a time saver. I use it for some simple tasks, like putting dates on shop drawings, but the amount of time it saves me has been fantastic. And the couple of times I have emailed tech support with questions, the response has been rapid and with an answer I could understand easily.
Thanks Hurricane for such a great product.".
- Randy Godwin Drafting Services ( website )
View All | Click to add your testimonial
Click here for main site.
U
UCSAXISANG Stores the default angle when rotating the UCS around one of its axes using the X, Y, or Z options of the UCS command
UCSBASE Stores the name of the UCS that defines the origin and orientation of orthographic UCS settings
UCSFOLLOW Generates a plan view whenever you change from one UCS to another
UCSICON Displays the UCS icon for the current viewport
UCSNAME Stores the name of the current coordinate system for the current viewport in the current space
UCSORG Stores the origin point of the current coordinate system for the current viewport in the current space
UCSORTHO Determines whether the related orthographic UCS setting is restored automatically when an orthographic view is restored
UCSVIEW Determines whether the current UCS is saved with a named view
UCSVP Determines whether the UCS in active viewports remains fixed or changes to reflect the UCS of the currently active viewport
UCSXDIR Stores the X direction of the current UCS for the current viewport in the current space
UCSYDIR Stores the Y direction of the current UCS for the current viewport in the current space
UNDOCTL Stores a bitcode indicating the state of the Auto and Control options of the UNDO command
UNDOMARKS Stores the number of marks that have been placed in the UNDO control stream by the Mark option
UNITMODE Controls the display format for units
USERI1&#8211;5 Stores and retrieves integer values
USERR1&#8211;5 Stores and retrieves real numbers
USERS1&#8211;5 Stores and retrieves text string data
V
VIEWCTR Stores the center of view in the current viewport
VIEWDIR Stores the viewing direction in the current viewport
VIEWMODE Controls the View mode for the current viewport using bitcode
VIEWSIZE Stores the height of the view in the current viewport
VIEWTWIST Stores the view twist angle for the current viewport
VISRETAIN Controls the visibility, color, linetype, lineweight, and plot styles (if PSTYLEPOLICY is set to 0) of xref-dependent layers and specifies whether nested xref path changes are saved
VSMAX Stores the upper-right corner of the current viewport's virtual screen
VSMIN Stores the lower-left corner of the current viewport's virtual screen
W
WHIPARC Controls whether the display of circles and arcs is smooth
WMFBKGND Controls the background of the output Windows metafile resulting from the WMFOUT command, and for the metafile format of objects placed on the Clipboard or dragged and dropped into other applications
WORLDUCS Indicates whether the UCS is the same as the WCS
WORLDVIEW Determines whether input to the 3DORBIT, DVIEW, and VPOINT commands is relative to the WCS (default), the current UCS, or the UCS specified by the UCSBASE system variable
WRITESTAT Indicates whether a drawing file is read-only or can be written to, for developers who need to determine write status through AutoLISP
X
XCLIPFRAME Controls the visibility of xref clipping boundaries
XEDIT Controls whether the current drawing can be edited in-place when being referenced by another drawing
XFADECTL Controls the fading intensity for references being edited in-place
XLOADCTL Turns xref demand loading on and off and controls whether it opens the original drawing or a copy
XLOADPATH Creates a path for storing temporary copies of demand-loaded xref files
XREFCTL Controls whether AutoCAD writes external reference log (XLG) files
Z
ZOOMFACTOR Controls the incremental change in zoom with each IntelliMouse wheel action, whether forward or backward

  • 1

Ideas don't matter, execution does!

1908412_308002392716743_8165279281236341


#1055 Doan Van Ha

Doan Van Ha

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 5447 Bài viết
Điểm đánh giá: 2624 (tuyệt vời)

Đã gửi 13 January 2012 - 10:36 PM

lập 1 list tất cả sysvar rồi lặp qua hết là lấy dc thôi :)

tham khảo Sysvar của AutoCAD 2000


AutoCAD 2000
System Variables
A
ACADLSPASDOC Controls whether AutoCAD loads the acad.lsp file into every drawing or just the first drawing opened in an AutoCAD session
ACADPREFIX Stores the directory path, if any, specified by the ACAD environment variable, with path separators appended if necessary
ACADVER Stores the AutoCAD version number
ACISOUTVER Controls the ACIS version of SAT files created using the ACISOUTcommand
AFLAGS Sets attribute flags for ATTDEF bit-code
ANGBASE Sets the base angle 0 with respect to the current UCS
ANGDIR Sets the positive angle direction from angle 0 with respect to the current UCS
APBOX Turns the AutoSnap aperture box on or off
APERTURE Sets object snap target height, in pixels
AREA Stores the last area computed by AREA, LIST, or DBLIST
ATTDIA Controls whether -INSERT uses a dialog box for attribute value entry
ATTMODE Controls display of attributes
ATTREQ Determines whether INSERT uses default attribute settings during insertion of blocks
AUDITCTL Controls whether AUDIT creates an audit report (ADT) file
AUNITS Sets units for angles
AUPREC Sets the number of decimal places for angular units
AUTOSNAP Controls AutoSnap marker, tooltip, and magnet
B
BACKZ Stores the back clipping plane offset from the target plane for the current viewport
BINDTYPE Controls how xref names are handled when binding xrefs or editing xrefs in-place
BLIPMODE Controls whether marker blips are visible
C
CDATE Sets calendar date and time
CECOLOR Sets the color of new objects
CELTSCALE Sets the current object linetype scaling factor
CELTYPE Sets the linetype of new objects
CELWEIGHT Sets the lineweight of new objects
CHAMFERA Sets the first chamfer distance
CHAMFERB Sets the second chamfer distance
CHAMFERC Sets the chamfer length
CHAMFERD Sets the chamfer angle
CHAMMODE Sets the input method by which AutoCAD creates chamfers
CIRCLERAD Sets the default circle radius
CLAYER Sets the current layer
CMDACTIVE Stores the bit-code that indicates whether an ordinary command, transparent command, script, or dialog box is active
CMDECHO Controls whether AutoCAD echoes prompts and input during the AutoLISP (command) function
CMDNAMES Displays the names of the active and transparent commands
CMLJUST Specifies multiline justification
CMLSCALE Controls the overall width of a multiline
CMLSTYLE Sets the multiline style
COMPASS Controls whether the 3D compass is on or off in the current viewport
COORDS Controls when coordinates are updated on the status line
CPLOTSTYLE Controls the current plot style for new objects
CPROFILE Stores the name of the current profile
CTAB Returns the name of the current (model or layout) tab in the drawing. Provides a means for the user to determine which tab is active
CURSORSIZE Determines the size of the crosshairs as a percentage of the screen size
CVPORT Sets the identification number of the current viewport
D
DATE Stores the current date and time
DBMOD Indicates the drawing modification status using bit-code
DCTCUST Displays the path and file name of the current custom spelling dictionary
DCTMAIN Displays the file name of the current main spelling dictionary
DEFLPLSTYLE Specifies the default plot style for new layers
DEFPLSTYLE Specifies the default plot style for new objects
DELOBJ Controls whether objects used to create other objects are retained or deleted from the drawing database
DEMANDLOAD Specifies if and when AutoCAD demand loads a third-party application if a drawing contains custom objects created in that application
DIASTAT Stores the exit method of the most recently used dialog box
DIMADEC Controls the number of places of precision displayed for angular dimensions
DIMALT Controls the display of alternate units in dimensions
DIMALTD Controls the number of decimal places in alternate units
DIMALTF Controls the multiplier for alternate units
DIMALTRND Determines rounding of alternate units
DIMALTTD Sets the number of decimal places for the tolerance values in the alternate units of a dimension
DIMALTTZ Toggles suppression of zeros in tolerance values
DIMALTU Sets the units format for alternate units of all dimension style family members except angular
DIMALTZ Controls the suppression of zeros for alternate unit dimension values
DIMAPOST Specifies a text prefix or suffix (or both) to the alternate dimension measurement for all types of dimensions except angular
DIMASO Controls the associativity of dimension objects
DIMASZ Controls the size of dimension line and leader line arrowheads
DIMATFIT Determines how dimension text and arrows are arranged when space is not sufficient to place both within the extension lines
DIMAUNIT Sets the units format for angular dimensions
DIMAZIN Suppresses zeros for angular dimensions
DIMBLK Sets the arrowhead block displayed at the ends of dimension lines or leader lines
DIMBLK1 Sets the arrowhead for the first end of the dimension line when DIMSAH is on
DIMBLK2 Sets the arrowhead for the second end of the dimension line when DIMSAH is on
DIMCEN Controls drawing of circle or arc center marks and centerlines by DIMCENTER, DIMDIAMETER, and DIMRADIUS
DIMCLRD Assigns colors to dimension lines, arrowheads, and dimension leader lines
DIMCLRE Assigns colors to dimension extension lines
DIMCLRT Assigns colors to dimension text
DIMDEC Sets the number of decimal places displayed for the primary units of a dimension
DIMDLE Sets the distance the dimension line extends beyond the extension line when oblique strokes are drawn instead of arrowheads
DIMDLI Controls the spacing of dimension lines in baseline dimensions
DIMDSEP Specifies a single character decimal separator to use when creating dimensions whose unit format is decimal
DIMEXE Specifies how far to extend the extension line beyond the dimension line
DIMEXO Specifies how far extension lines are offset from origin points
DIMFIT Obsolete. Replaced by DIMATFIT and DIMTMOVE
DIMFRAC Sets the fraction format when DIMLUNIT is set to 4 or 5
DIMGAP Sets the distance around the dimension text when the dimension line breaks to accommodate dimension text
DIMJUST Controls the horizontal positioning of dimension text
DIMLDRBLK Specifies the arrow type for leaders
DIMLFAC Sets a scale factor for linear dimension measurements
DIMLIM Generates dimension limits as the default text
DIMLUNIT Sets units for all dimension types except Angular
DIMLWD Assigns lineweight to dimension lines
DIMLWE Assigns lineweight to extension lines
DIMPOST Specifies a text prefix or suffix (or both) to the dimension measurement
DIMRND Rounds all dimensioning distances to the specified value
DIMSAH Controls the display of dimension line arrowhead blocks
DIMSCALE Sets the overall scale factor applied to dimensioning variables that specify sizes, distances, or offsets
DIMSD1 Controls suppression of the first dimension line
DIMSD2 Controls suppression of the second dimension line
DIMSE1 Suppresses display of the first extension line
DIMSE2 Suppresses display of the second extension line
DIMSHO Controls redefinition of dimension objects while dragging
DIMSOXD Suppresses drawing of dimension lines outside the extension lines
DIMSTYLE Shows the current dimension style
DIMTAD Controls the vertical position of text in relation to the dimension line
DIMTDEC Sets the number of decimal places to display in tolerance values for the primary units in a dimension
DIMTFAC Sets a scale factor used to calculate the height of text for dimension fractions and tolerances
DIMTIH Controls the position of dimension text inside the extension lines for all dimension types except ordinate
DIMTIX Draws text between extension lines
DIMTM When DIMTOL or DIMLIM is on, sets the minimum (or lower) tolerance limit for dimension text
DIMTMOVE Sets dimension text movement rules
DIMTOFL Controls whether a dimension line is drawn between the extension lines even when the text is placed outside
DIMTOH Controls the position of dimension text outside the extension lines
DIMTOL Appends tolerances to dimension text
DIMTOLJ Sets the vertical justification for tolerance values relative to the nominal dimension text
DIMTP When DIMTOL or DIMLIM is on, sets the maximum (or upper) tolerance limit for dimension text
DIMTSZ Specifies the size of oblique strokes drawn instead of arrowheads for linear, radius, and diameter dimensioning
DIMTVP Controls the vertical position of dimension text above or below the dimension line
DIMTXSTY Specifies the text style of the dimension
DIMTXT Specifies the height of dimension text, unless the current text style has a fixed height
DIMTZIN Controls the suppression of zeros in tolerance values
DIMUNIT Obsolete. Replaced by DIMLUNIT and DIMFRAC
DIMUPT Controls options for user-positioned text
DIMZIN Controls the suppression of zeroes in the primary unit value
DISPSILH Controls display of silhouette curves of solid objects in Wireframe mode
DISTANCE Stores the distance computed by DIST
DONUTID Sets the default for the inside diameter of a donut
DONUTOD Sets the default for the outside diameter of a donut
DRAGMODE Controls the display of objects being dragged
DRAGP1 Sets the regen-drag input sampling rate
DRAGP2 Sets the fast-drag input sampling rate
DWGCHECK Determines whether a drawing was last edited by a product other than AutoCAD
DWGCODEPAGE Stores the same value as SYSCODEPAGE (for compatibility reasons)
DWGNAME Stores the drawing name as entered by the user
DWGPREFIX Stores the drive/directory prefix for the drawing
DWGTITLED Indicates whether the current drawing has been named
"Hurricane has been one of the best products I have run across. I never had the time to create scripts, but I new they could be a time saver. I use it for some simple tasks, like putting dates on shop drawings, but the amount of time it saves me has been fantastic. And the couple of times I have emailed tech support with questions, the response has been rapid and with an answer I could understand easily.
Thanks Hurricane for such a great product.".
- Randy Godwin Drafting Services ( website )
View All | Click to add your testimonial
Click here for main site.
E
EDGEMODE Controls how TRIM and EXTEND determine cutting and boundary edges
ELEVATION Stores the current elevation relative to the current UCS for the current viewport in the current space
EXPERT Controls whether certain prompts are issued
EXPLMODE Controls whether EXPLODE supports nonuniformly scaled (NUS) blocks
EXTMAX Stores the upper-right point of the drawing extents
EXTMIN Stores the lower-left point of the drawing extents
EXTNAMES Sets the parameters for named object names (such as linetypes and layers) stored in symbol tables
F
FACETRATIO Controls the aspect ratio of faceting for cylindrical and conic ACIS solids
FACETRES Adjusts the smoothness of shaded and rendered objects and objects with hidden lines removed
FILEDIA Suppresses display of the file dialog boxes
FILLETRAD Stores the current fillet radius
FILLMODE Specifies whether multilines, traces, solids, all hatches (including solid-fill), and wide polylines are filled in
FONTALT Specifies the alternate font to be used when the specified font file cannot be located
FONTMAP Specifies the font mapping file to be used
FRONTZ Stores the front clipping plane offset from the target plane for the current viewport
FULLOPEN Indicates whether the current drawing is partially open
G
GRIDMODE Specifies whether the grid is turned on or off
GRIDUNIT Specifies the grid spacing (X and Y) for the current viewport
GRIPBLOCK Controls the assignment of grips in blocks
GRIPCOLOR Controls the color of nonselected grips (drawn as box outlines)
GRIPHOT Controls the color of selected grips (drawn as filled boxes)
GRIPS Controls the use of selection set grips for the Stretch, Move, Rotate, Scale, and Mirror grip modes
GRIPSIZE Sets the size of the grip box in pixels
H
HANDLES Reports whether object handles can be accessed by applications
HIDEPRECISION Controls the accuracy of hides and shades
HIGHLIGHT Controls object highlighting; does not affect objects selected with grips
HPANG Specifies the hatch pattern angle
HPBOUND Controls the object type created by BHATCH and BOUNDARY
HPDOUBLE Specifies hatch pattern doubling for user-defined patterns
HPNAME Sets a default hatch pattern name
HPSCALE Specifies the hatch pattern scale factor
HPSPACE Specifies the hatch pattern line spacing for user-defined simple patterns
HYPERLINKBASE Specifies the path used for all relative hyperlinks in the drawing
I
IMAGEHLT Controls whether the entire raster image or only the raster image frame is hightlighted
INDEXCTL Controls whether layer and spatial indexes are created and saved in drawing files
INETLOCATION Stores the Internet location used by BROWSER and the Browse the Web dialog box
INSBASE Stores insertion base point set by BASE
INSNAME Sets a default block name for INSERT
INSUNITS When you drag a block from AutoCAD DesignCenter, specifies a drawing units value
INSUNITSDEFSOURCE Sets source content units value
INSUNITSDEFTARGET Sets target drawing units value
ISAVEBAK Improves the speed of incremental saves, especially for large drawings
ISAVEPERCENT Determines the amount of wasted space tolerated in a drawing file
ISOLINES Specifies the number of isolines per surface on objects
L
LASTANGLE Stores the end angle of the last arc entered
LASTPOINT Stores the last point entered
LASTPROMPT Stores the last string echoed to the command line
LENSLENGTH Stores the length of the lens (in millimeters) used in perspective viewing for the current viewport
LIMCHECK Controls the creation of objects outside the drawing limits
LIMMAX Stores the upper-right drawing limits for the current space
LIMMIN Stores the lower-left drawing limits for the current space
LISPINIT When single-document interface is enabled, specifies whether AutoLISP-defined functions and variables are preserved when you open a new drawing
LOCALE Displays the ISO language code of the current AutoCAD version
LOGFILEMODE Specifies whether the contents of the text window are written to a log file
LOGFILENAME Specifies the path and name of the log file
LOGFILEPATH Specifies the path for the log files for all drawings in a session
LOGINNAME Displays the user's name as configured or as input when AutoCAD is loaded
LTSCALE Sets the global linetype scale factor
LUNITS Sets linear units
LUPREC Sets the number of decimal places displayed for linear units
LWDEFAULT Sets the value for the default linweight
LWDISPLAY Controls whether the lineweight is displayed in the Model or Layout tab
LWUNITS Controls whether lineweight units are displayed in inches or millimeters
M
MAXACTVP Sets the maximum number of viewports that can be active at one time in the display
MAXSORT Sets the maximum number of symbol names or block names sorted by listing commands
MBUTTONPAN Controls the behavior of the third button or wheel on the pointing device
MEASUREINIT Sets the initial drawing units as English or metric
MEASUREMENT Sets drawing units as English or metric for the current drawing only
MENUCTL Controls the page switching of the screen menu
MENUECHO Sets menu echo and prompt control bits
MENUNAME Stores the menu file name, including the path for the filename
MIRRTEXT Controls how MIRROR reflects text
MODEMACRO Displays a text string on the status line
MTEXTED Sets the primary and secondary text editors to use for multiline text objects
N
NOMUTT Suppresses the message display (muttering) when it wouldn't normally be suppressed
O
OFFSETDIST Sets the default offset distance
OFFSETGAPTYPE Controls how to offset polylines when a gap is created as a result of offsetting the individual polyline segments
OLEHIDE Controls the display of OLE objects in AutoCAD
OLEQUALITY Controls the default quality level for embedded OLE objects
OLESTARTUP Controls whether the source application of an embedded OLE object loads when plotting
ORTHOMODE Constrains cursor movement to the perpendicular
OSMODE Sets running object snap modes using bitcodes
OSNAPCOORD Controls whether coordinates entered on the command line override running object snaps
"Hurricane has been one of the best products I have run across. I never had the time to create scripts, but I new they could be a time saver. I use it for some simple tasks, like putting dates on shop drawings, but the amount of time it saves me has been fantastic. And the couple of times I have emailed tech support with questions, the response has been rapid and with an answer I could understand easily.
Thanks Hurricane for such a great product.".
- Randy Godwin Drafting Services ( website )
View All | Click to add your testimonial
Click here for main site.
P
PAPERUPDATE Controls the display of a warning dialog when attempting to print a layout with a paper size different from the paper size specified by the default for the plotter configuration file
PDMODE Controls how point objects are displayed
PDSIZE Sets the display size for point objects
PERIMETER Stores the last perimeter value computed by AREA, LIST, or DBLIST
PFACEVMAX Sets the maximum number of vertices per face
PICKADD Controls whether subsequent selections replace the current selection set or add to it
PICKAUTO Controls automatic windowing at the Select Objects prompt
PICKBOX Sets object selection target height
PICKDRAG Controls the method of drawing a selection window
PICKFIRST Controls whether you select objects before or after you issue a command
PICKSTYLE Controls the use of group selection and associative hatch selection
PLATFORM Indicates which platform of AutoCAD is in use
PLINEGEN Sets how linetype patterns generate around the vertices of a 2D polyline
PLINETYPE Specifies whether AutoCAD uses optimized 2D polylines
PLINEWID Stores the default polyline width
PLOTID Obsolete, has no effect in AutoCAD 2000 except to preserve the integrity of pre-AutoCAD 2000 scripts and LISP routines
PLOTROTMODE Controls the orientation of plots
PLOTTER Obsolete. Has no effect in AutoCAD 2000 except to preserve the integrity of pre-AutoCAD 2000 scripts and LISP routines
PLQUIET Controls the display of optional dialog boxes and nonfatal errors for batch plotting and scripts
POLARADDANG Contains user-defined polar angles
POLARANG Sets the polar angle increment
POLARDIST Sets the snap increment when the SNAPSTYL system variable is set to 1 (polar snap)
POLARMODE Controls settings for polar and object snap tracking
POLYSIDES Sets the default number of sides for POLYGON
POPUPS Displays the status of the currently configured display driver
PRODUCT Returns the product name
PROGRAM Returns the program name
PROJECTNAME Assigns a project name to the current drawing
PROJMODE Sets the current Projection mode for trimming or extending
PROXYGRAPHICS Specifies whether images of proxy objects are saved in the drawing
PROXYNOTICE Displays a notice when you open a drawing containing custom objects created by an application that is not present
PROXYSHOW Controls the display of proxy objects in a drawing
PSLTSCALE Controls paper space linetype scaling
PSPROLOG Assigns a name for a prolog section to be read from the acad.psf file when you are using PSOUT
PSQUALITY Controls the rendering quality of PostScript images
PSTYLEMODE Indicates whether the current drawing is in a Color-Dependent or Named Plot Style mode
PSTYLEPOLICY Controls whether an object's color property is associated with its plot style
PSVPSCALE Sets the view scale factor for all newly created viewports
PUCSBASE Stores the name of the UCS that defines the origin and orientation of orthographic UCS settings in paper space only
Q
QTEXTMODE Controls how text is displayed
R
RASTERPREVIEW Controls whether BMP preview images are saved with the drawing
REFEDITNAME Indicates whether a drawing is in a reference-editing state and stores the reference file name
REGENMODE Controls automatic regeneration of the drawing
RE-INIT Reinitializes the digitizer, digitizer port, and acad.pgp file
RTDISPLAY Controls the display of raster images during Realtime ZOOM or PAN
S
SAVEFILE Stores the current auto-save file name
SAVEFILEPATH Specifies the path to the directory for all automatic save files for the AutoCAD session.
SAVENAME Stores the file name and directory path of the current drawing after you save it
SAVETIME Sets the automatic save interval, in minutes
SCREENBOXES Stores the number of boxes in the screen menu area of the drawing area
SCREENMODE Stores a bitcode indicating the graphics/text state of the AutoCAD display
SCREENSIZE Stores current viewport size in pixels (X and Y)
SDI Controls whether AutoCAD runs in single- or multiple-document interface
SHADEDGE Controls the shading of edges in rendering
SHADEDIF Sets the ratio of diffuse reflective light to ambient light
SHORTCUTMENU Controls whether Default, Edit, and Command mode shortcut menus are available in the drawing area
SHPNAME Sets a default shape name
SKETCHINC Sets the record increment for SKETCH
SKPOLY Determines whether SKETCH generates lines or polylines
SNAPANG Sets snap and grid rotation angle for the current viewport
SNAPBASE Sets the snap and grid origin point for the current viewport relative to the current UCS
SNAPISOPAIR Controls the isometric plane for the current viewport
SNAPMODE Turns Snap mode on and off
SNAPSTYL Sets snap style for the current viewport
SNAPTYPE Sets the snap style for the current viewport
SNAPUNIT Sets the snap spacing for the current viewport
SOLIDCHECK Turns the solid validation on and off for the current AutoCAD session
SORTENTS Controls the OPTIONS command (from the Selection tab) object sort order operations
SPLFRAME Controls the display of splines and spline-fit polylines
SPLINESEGS Sets the number of line segments to be generated for each spline-fit polyline
SPLINETYPE Sets the type of curve generated by the Spline option of the PEDIT command
SURFTAB1 Sets the number of tabulations to be generated for RULESURF and TABSURF
SURFTAB2 Sets the mesh density in the N direction for REVSURF and EDGESURF
SURFTYPE Controls the type of surface-fitting to be performed by the Smooth option of the PEDIT command
SURFU Sets the surface density for PEDIT Smooth in the M direction
SURFV Sets the surface density for PEDIT Smooth in the N direction
SYSCODEPAGE Indicates the system code page specified in acad.xmf
T
TABMODE Controls the use of the tablet
TARGET Stores the location of the target point for the current viewport
TDCREATE Stores the local time and date the drawing was created
TDINDWG Stores the total editing time
TDUCREATE Stores the universal time and date the drawing was created
TDUPDATE Stores the local time and date of the last update/save
TDUSRTIMER Stores the user-elapsed timer
TDUUPDATE Stores the universal time and date of the last update/save
TEMPPREFIX Contains the directory name for temporary files
TEXTEVAL Controls the method of evaluation for text strings
TEXTFILL Controls the filling of TrueType fonts while plotting, exporting with the PSOUT command, and rendering
TEXTQLTY Sets the resolution tesselation fineness of text outlines for TrueType fonts while plotting, exporting with the PSOUT command, and rendering
TEXTSIZE Sets the default height for new text objects drawn with the current text style
TEXTSTYLE Sets the name of the current text style
THICKNESS Sets the current 3D solid thickness
TILEMODE Makes the Model tab or the last layout tab current
TOOLTIPS Controls the display of tooltips
TRACEWID Sets the default trace width
TRACKPATH Controls the display of polar and object snap tracking alignment paths
TREEDEPTH Specifies the maximum depth, that is, the number of times the tree-structured spatial index can divide into branches
TREEMAX Limits memory consumption during drawing regeneration by limiting the number of nodes in the spatial index (oct-tree)
TRIMMODE Controls whether AutoCAD trims selected edges for chamfers and fillets
TSPACEFAC Controls the multiline text line spacing distance measured as a factor of text height
TSPACETYPE Controls the type of line spacing used in multiline text
TSTACKALIGN Controls the vertical alignment of stacked text
TSTACKSIZE Controls the percentage of stacked text fraction height relative to selected text's current height
"Hurricane has been one of the best products I have run across. I never had the time to create scripts, but I new they could be a time saver. I use it for some simple tasks, like putting dates on shop drawings, but the amount of time it saves me has been fantastic. And the couple of times I have emailed tech support with questions, the response has been rapid and with an answer I could understand easily.
Thanks Hurricane for such a great product.".
- Randy Godwin Drafting Services ( website )
View All | Click to add your testimonial
Click here for main site.
U
UCSAXISANG Stores the default angle when rotating the UCS around one of its axes using the X, Y, or Z options of the UCS command
UCSBASE Stores the name of the UCS that defines the origin and orientation of orthographic UCS settings
UCSFOLLOW Generates a plan view whenever you change from one UCS to another
UCSICON Displays the UCS icon for the current viewport
UCSNAME Stores the name of the current coordinate system for the current viewport in the current space
UCSORG Stores the origin point of the current coordinate system for the current viewport in the current space
UCSORTHO Determines whether the related orthographic UCS setting is restored automatically when an orthographic view is restored
UCSVIEW Determines whether the current UCS is saved with a named view
UCSVP Determines whether the UCS in active viewports remains fixed or changes to reflect the UCS of the currently active viewport
UCSXDIR Stores the X direction of the current UCS for the current viewport in the current space
UCSYDIR Stores the Y direction of the current UCS for the current viewport in the current space
UNDOCTL Stores a bitcode indicating the state of the Auto and Control options of the UNDO command
UNDOMARKS Stores the number of marks that have been placed in the UNDO control stream by the Mark option
UNITMODE Controls the display format for units
USERI1&#8211;5 Stores and retrieves integer values
USERR1&#8211;5 Stores and retrieves real numbers
USERS1&#8211;5 Stores and retrieves text string data
V
VIEWCTR Stores the center of view in the current viewport
VIEWDIR Stores the viewing direction in the current viewport
VIEWMODE Controls the View mode for the current viewport using bitcode
VIEWSIZE Stores the height of the view in the current viewport
VIEWTWIST Stores the view twist angle for the current viewport
VISRETAIN Controls the visibility, color, linetype, lineweight, and plot styles (if PSTYLEPOLICY is set to 0) of xref-dependent layers and specifies whether nested xref path changes are saved
VSMAX Stores the upper-right corner of the current viewport's virtual screen
VSMIN Stores the lower-left corner of the current viewport's virtual screen
W
WHIPARC Controls whether the display of circles and arcs is smooth
WMFBKGND Controls the background of the output Windows metafile resulting from the WMFOUT command, and for the metafile format of objects placed on the Clipboard or dragged and dropped into other applications
WORLDUCS Indicates whether the UCS is the same as the WCS
WORLDVIEW Determines whether input to the 3DORBIT, DVIEW, and VPOINT commands is relative to the WCS (default), the current UCS, or the UCS specified by the UCSBASE system variable
WRITESTAT Indicates whether a drawing file is read-only or can be written to, for developers who need to determine write status through AutoLISP
X
XCLIPFRAME Controls the visibility of xref clipping boundaries
XEDIT Controls whether the current drawing can be edited in-place when being referenced by another drawing
XFADECTL Controls the fading intensity for references being edited in-place
XLOADCTL Turns xref demand loading on and off and controls whether it opens the original drawing or a copy
XLOADPATH Creates a path for storing temporary copies of demand-loaded xref files
XREFCTL Controls whether AutoCAD writes external reference log (XLG) files
Z
ZOOMFACTOR Controls the incremental change in zoom with each IntelliMouse wheel action, whether forward or backward

Cám ơn bạn! Trong lúc chờ đợi thì cũng chợt nghĩ ra hướng g/q. Nhưng dù sao vẫn cám ơn bạn.
P/S (11h19): bạn lấy System Variable trên cad2000, còn tôi lấy trên 2007, chúng khác nhau. Cad đời càng mới thì càng nhiều biến, như vậy cách của bạn và tôi cũng chưa triệt để lắm nhỉ. Vậy, làm sao lấy được giá trị của tất cả chúng mà không cần quan tâm tới phiên bản cad? (nghĩa là cad có bao nhiêu thì lấy hết bấy nhiêu).
  • 0

* Chỉ nên yêu cầu Lisp khi bạn làm việc đó mất cả ngày nhưng họ chỉ viết 1 giờ. Đừng nêu yêu cầu Lisp khi bạn chỉ làm 1 giờ nhưng bắt họ phải mất cả ngày.

* Nhờ viết lisp cũng như đi khám bệnh. Chỉ gởi căn cước và than sắp chết thì không bác sỹ nào cứu sống được.


#1056 Thaistreetz

Thaistreetz

    biết lệnh adcenter

  • Advance Member
  • PipPipPipPipPipPipPip
  • 903 Bài viết
Điểm đánh giá: 505 (tốt)

Đã gửi 14 January 2012 - 01:24 AM

Ai biết xin chỉ giùm: làm sao để lấy giá trị của tất cả các biến hệ thống của 1 bản vẽ?

(command "setvar" "?" "") rồi cứ thế mà enter
Ngoài các biến được cad liệt kê còn có 1 số biến đặc biệt không được công bố do viêc thay đổi giá trị của chúng không được khuyến khích (có 1 topic của bác Hoành nêu cụ thể các biến này) Nếu bạn không có nhu cầu gì quá đặc biệt thì cũng không cần quan tâm đến chúng.
  • 1

Hình đã gửi
IN HIM, I TRUST. THE TRUST IN MY GOD


#1057 Doan Van Ha

Doan Van Ha

    biết lệnh adcenter

  • CADViet Team
  • PipPipPipPipPipPipPip
  • 5447 Bài viết
Điểm đánh giá: 2624 (tuyệt vời)

Đã gửi 14 January 2012 - 08:41 AM

Có lẽ do câu hỏi của tôi chưa được sáng sủa nên chưa nhận được câu trả lời như ý tôi muốn. Tôi muốn lấy list of system variables để sử dụng nó trong 1 chương trình lsp, không phụ thuộc vào phiên bản cad.
Chẳng hạn:
lstvar = '("3DDWFPREC" "ACADLSPASDOC" "ACADPREFIX" "ACADVER" ... "XREFTYPE" "ZOOMFACTOR" "ZOOMWHEEL")
  • 0

* Chỉ nên yêu cầu Lisp khi bạn làm việc đó mất cả ngày nhưng họ chỉ viết 1 giờ. Đừng nêu yêu cầu Lisp khi bạn chỉ làm 1 giờ nhưng bắt họ phải mất cả ngày.

* Nhờ viết lisp cũng như đi khám bệnh. Chỉ gởi căn cước và than sắp chết thì không bác sỹ nào cứu sống được.


#1058 ketxu

ketxu

    Copier - Paster - Editor

  • Moderator
  • PipPipPipPipPipPipPip
  • 5678 Bài viết
Điểm đánh giá: 2605 (tuyệt vời)

Đã gửi 14 January 2012 - 09:20 AM

Có lẽ do câu hỏi của tôi chưa được sáng sủa nên chưa nhận được câu trả lời như ý tôi muốn. Tôi muốn lấy list of system variables để sử dụng nó trong 1 chương trình lsp, không phụ thuộc vào phiên bản cad.
Chẳng hạn:
lstvar = '("3DDWFPREC" "ACADLSPASDOC" "ACADPREFIX" "ACADVER" ... "XREFTYPE" "ZOOMFACTOR" "ZOOMWHEEL")

Theo e thì không khả thi vì nơi lưu trữ các biến k cố định - Danh sách các biến không cố định.
Có lẽ bác bắt buộc phải list trước các biến ra và xử lý theo từng phiên bản - Biến còn - Biến mất

Bác có thể tham khảo + lợi dụng thêm 2 lệnh acadinfo + vars2scr , code trong ACET
  • 1

Thành viên nhóm CadMagic.
Mời bạn ghé thăm facebook nhóm - Page viết lisp theo yêu cầu  :
CAD MAGIC


#1059 Tue_NV

Tue_NV

    KS Võ Quang Tuệ

  • Moderator
  • PipPipPipPipPipPipPip
  • 4296 Bài viết
Điểm đánh giá: 3804 (đỉnh cao)

Đã gửi 14 January 2012 - 09:32 AM

Có lẽ do câu hỏi của tôi chưa được sáng sủa nên chưa nhận được câu trả lời như ý tôi muốn. Tôi muốn lấy list of system variables để sử dụng nó trong 1 chương trình lsp, không phụ thuộc vào phiên bản cad.
Chẳng hạn:
lstvar = '("3DDWFPREC" "ACADLSPASDOC" "ACADPREFIX" "ACADVER" ... "XREFTYPE" "ZOOMFACTOR" "ZOOMWHEEL")

Đây là điều mà CAD làm được nhưng với LISP thì không làm được
CAD có thể sử dụng lệnh SetVar còn LSP thì không thể tự List ra được (không phụ thuộc vào phiên bản cad)
  • 1

#1060 ketxu

ketxu

    Copier - Paster - Editor

  • Moderator
  • PipPipPipPipPipPipPip
  • 5678 Bài viết
Điểm đánh giá: 2605 (tuyệt vời)

Đã gửi 14 January 2012 - 10:28 AM

Đây là điều mà CAD làm được nhưng với LISP thì không làm được
CAD có thể sử dụng lệnh SetVar còn LSP thì không thể tự List ra được (không phụ thuộc vào phiên bản cad)

E nghĩ là được bác ạ - Nếu nhất thiết muốn dùng "setvar ? *"
Để làm được điều đó thì bác ĐVH cần làm vài việc sau :
1- Chọn đường dẫn để logfilepath -> Logfileoff -> logfileon
2- Sử dụng vla-sendcommand hoặc WSH để tạo hàm send nút Enter
3- Kết hợp lệnh setvar ? với hàm send enter + cmdactive để enter đến khi xong lệnh setvar
4- Lúc này toàn bộ các thứ trên F2 đã được lưu vào log -> logfileoff
5- Hàm tách chuỗi (xử lý phân biệt var - val) để lấy text đầu trong mỗi dòng file log (bắt đầu từ đoạn Enter variable(s) to list <*>: *)
6 - Đưa ngược trở về list
  • 1

Thành viên nhóm CadMagic.
Mời bạn ghé thăm facebook nhóm - Page viết lisp theo yêu cầu  :
CAD MAGIC