Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/04/2020 in all areas

  1. The unavailability of the ActiveX Area property for a Hatch object is typically a result of the hatch having a self-intersecting boundary. Whilst you could easily circumvent the error that you are receiving using a vl-catch-all-apply expression, this will simply skip over those hatches for which the area property is unavailable and so the total area returned will be inaccurate.
    1 point
  2. Post a dxf file or AutoCAD 2010 or earlier sample drawing containing hatches and hatches without areas
    1 point
  3. (setq ar (vlax-get en 'Area)) (if ar ?? (setq tot (+ tot ar)) ) need a zero hatch area to test
    1 point
  4. Wrap your tot in a if so if not exist area skip.
    1 point
  5. (eq expression 1 expression 2) It mainly determines whether the two expressions have the same constraint conditions (whether Expression 1 and Expression 2 are set to the same object. (setq f1 '(a b c) f2 '(a b c)) (setq f3 f2) (eq f1 f2) ;---->nil ,Because f1 and f2 have the same value, they do not point to the same list (eq f3 f2) ;---->T,Because f3 and f2 point to the same list So I will tell you this, you should be able to understand it. In the case of not sure whether it is the same table, I generally use (equal expression 1 expression 2 [FUZZ])
    1 point
  6. give this a try: (vl-load-com) ;;; to make a 3d polyline******************************************* (defun c:pol (/ adoc spc ss cnt plst 3dline) (setq adoc(vla-get-activedocument(vlax-get-acad-object))) (setq spc(vlax-get adoc (if (equal (getvar "cvport") 1) 'PaperSpace 'ModelSpace );_if ) );_setq (setq ss (ssget '((0 . "POINT"))));_select only point objects (if ss (progn (setq cnt 0);_loop counter (setq plst '());_empty list (while (< cnt (sslength ss)) (setq plst (cons(cdr(assoc 10(entget (ssname ss cnt))))plst));_make point list (setq cnt (1+ cnt));_incerase counter );_while (setq 3dline (vla-add3dpoly ;_make 3d polyline spc (vlax-safearray-fill (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length (apply 'append plst))))) (apply 'append plst))) );_setq add 3dpoly );_progn );_if (princ) );_defun ;;; to make a 3d spline****************************************** (defun c:spl (/ adoc spc ss cnt plst 3dline stpt ept) (setq adoc(vla-get-activedocument(vlax-get-acad-object))) (setq spc(vlax-get adoc (if (equal (getvar "cvport") 1) 'PaperSpace 'ModelSpace );_if ) );_setq (setq ss (ssget '((0 . "POINT")))) (if ss (progn (setq cnt 0);_loop counter (setq plst '());_empty list (while (< cnt (sslength ss)) (setq plst (cons(cdr(assoc 10(entget (ssname ss cnt))))plst)) (setq cnt (1+ cnt));_incerase counter );_while (setq stpt (vlax-3d-point '(0.0 0.0 0.0)));_start pt for spline (setq ept (vlax-3d-point '(0.0 0.0 0.0)));_end pt for spline (setq cline (vla-addspline spc (vlax-safearray-fill (vlax-make-safearray vlax-vbDouble (cons 0 (1- (length (apply 'append plst))))) (apply 'append plst)) stpt ept ) );_setq add 3d spline );_progn );_if (princ) );_defun
    1 point
×
×
  • Create New...