Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/25/2019 in all areas

  1. Hi Lee Mac , thanks . It is clear as tap water . I learn a new thing today , I can go asleep satisfied .
    1 point
  2. 1. The name of the topic does not correspond to what you are writing about. 2. There is no example .dwg file. 3. End of the year, holidays - few people on the forum.
    1 point
  3. For example - _$ (setq lst1 '((1 "a" "b" "c") (2 "d" "e" "f") (3 "g" "h" "i"))) ((1 "a" "b" "c") (2 "d" "e" "f") (3 "g" "h" "i")) _$ (setq lst2 '((1 . "a") (2 . "b") (3 . "c"))) ((1 . "a") (2 . "b") (3 . "c")) _$ (assoc 1 lst1) (1 "a" "b" "c") _$ (assoc 1 lst2) (1 . "a")
    1 point
  4. Assuming that the diametric dimensions already exist in the drawing, you could reduce the program to a single prompt for a selection of multiple dimensions, extracting the diameter from the dimension measurement: (defun c:diapar ( / i l m s v x ) (setq l '( ( 75.0 . "5K-10A" ) ( 80.0 . "5K-15A" ) ( 85.0 . "5K-20A" ) ( 95.0 . "5K-25A" ) (115.0 . "5K-32A" ) (120.0 . "5K-40A" ) (130.0 . "5K-50A" ) (155.0 . "5K-65A" ) (180.0 . "5K-80A" ) (190.0 . "5K-90A" ) (200.0 . "5K-100A") (235.0 . "5K-125A") (265.0 . "5K-150A") (300.0 . "5K-175A") (320.0 . "5K-200A") (345.0 . "5K-225A") (385.0 . "5K-250A") (430.0 . "5K-300A") (480.0 . "5K-350A") ) ) (if (setq s (ssget "_:L" '( (0 . "*DIMENSION") (-4 . "<OR") (070 . 003) (070 . 035) (070 . 067) (070 . 099) (070 . 131) (070 . 163) (070 . 195) (070 . 227) (-4 . "OR>") ) ) ) (repeat (setq i (sslength s)) (if (setq i (1- i) x (entget (ssname s i)) m (cdr (assoc 42 x)) v (vl-some '(lambda ( x ) (if (equal m (car x) 0.5) (cdr x))) l) ) (entmod (subst (cons 1 v) (assoc 1 x) x)) ) ) ) (princ) )
    1 point
  5. This hasn't changed much in 12 years. http://cadpanacea.com/wp/?p=1402
    1 point
  6. 1. open image file in paint application- by default in window. 2. Select all [Ctrl +A] then copy or [Ctrl +C] 3. Paste [Ctrl+v] into ACAD drawing or on you tube search - embed image an image file in cad https://www.youtube.com/watch?v=N4lt7iAKWTQ
    1 point
  7. The system variable that you require for this task is AUTOSNAP. This system variable is bit-coded, with the following bit codes exhibiting the associated behaviour as described below: 0 Turns off the AutoSnap marker, tooltips, and magnet. Also turns off polar tracking, object snap tracking, and tooltips for polar tracking, object snap tracking, and Ortho mode 1 Turns on the AutoSnap marker 2 Turns on the AutoSnap tooltips 4 Turns on the AutoSnap magnet 8 Turns on polar tracking 16 Turns on object snap tracking 32 Turns on tooltips for polar tracking, object snap tracking, and Ortho mode As such, to control Polar tracking, you'll need to flip bit 8. Since we're working with a bit-coded integer, it is easiest & most appropriate to manipulate this value using the various bitwise functions defined in AutoLISP: boole, logand, logior, ~. Below are a few examples demonstrating how to accomplish this: Turn on Polar Tracking: (setvar 'autosnap (logior 8 (getvar 'autosnap))) Note that the above is still applicable even when polar tracking is already turned on, since logior implements inclusive OR logic (hence the name "ior"): _$ (logior 8 39) 47 _$ (logior 8 47) 47 Check if Polar Tracking is enabled: _$ (= 8 (logand 8 (getvar 'autosnap))) T Turn off Polar Tracking: (setvar 'autosnap (logand (~ 8) (getvar 'autosnap))) Note that the above is performing a bitwise AND against the 1's-complement of 8 which is 31-bits set to 1 with bit 8 set to 0, that is, returning all bits except bit 8: _$ (int->bin (~ 8)) "11111111111111111111111111110111" 11111111111111111111111111110111 = (~ 8) = -9 00000000000000000000000000101111 = 47 ---------------------------------- LOGAND 00000000000000000000000000100111 = 39 Check if Polar Tracking is disabled: _$ (zerop (logand 8 (getvar 'autosnap))) T Toggle Polar Tracking: _$ (setvar 'autosnap (boole 6 8 (getvar 'autosnap))) 47 _$ (setvar 'autosnap (boole 6 8 (getvar 'autosnap))) 39 Here, supplying the first argument of 6 to the boole function results in bitwise XOR logic (exclusive OR): 00000000000000000000000000001000 = 8 00000000000000000000000000101111 = 47 ---------------------------------- XOR 00000000000000000000000000100111 = 39 00000000000000000000000000001000 = 8 00000000000000000000000000100111 = 39 ---------------------------------- XOR 00000000000000000000000000101111 = 47
    1 point
  8. Anyone have any idea when Micorstation is actually going to fix their text issue of not wrapping. Im sick and tired of this crappy software not being smart enough to realize that a word needs to wrap the whole word and not just the last letter or two. You would think a company like Bentley would actually figure out how to properly work this into their software. Its just another reason I hate this software.
    1 point
×
×
  • Create New...