+ Reply to Thread
Page 3 of 3 FirstFirst 1 2 3
Results 21 to 26 of 26
  1. #21
    Super Member irneb's Avatar
    Computer Details
    irneb's Computer Details
    Operating System:
    Win7 Pro 64bit
    Computer:
    Antec One Hundred
    Motherboard:
    ASUS P8P67-Pro P67
    CPU:
    Intel i7 2600 @ 3.4GHz
    RAM:
    16GB-1600MHz
    Graphics:
    GeForce GT 430 (1GB)
    Primary Storage:
    Seagate1TB SATA2 - 7200rpm
    Monitor:
    Samsung 2333TN 23" 1920 x 1080 Full HD LCD Monitor2GW
    Discipline
    Architectural
    irneb's Discipline Details
    Occupation
    Architectural Technician and Programmer
    Discipline
    Architectural
    Using
    AutoCAD 2013
    Join Date
    Sep 2010
    Location
    Jo'burg SA
    Posts
    1,666

    Default

    Registered forum members do not see this ad.

    On Lee's site there are some tutorials on this: http://www.lee-mac.com/tutorials.html#lisptutorials
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  2. #22
    Forum Newbie
    Using
    AutoCAD 2011
    Join Date
    Aug 2012
    Posts
    4

    Default

    thanx guys, last question? Once i have successfully loaded the .lisp file how do i get my dims to actualy do what Bruce has mentioned?

  3. #23
    Super Member irneb's Avatar
    Computer Details
    irneb's Computer Details
    Operating System:
    Win7 Pro 64bit
    Computer:
    Antec One Hundred
    Motherboard:
    ASUS P8P67-Pro P67
    CPU:
    Intel i7 2600 @ 3.4GHz
    RAM:
    16GB-1600MHz
    Graphics:
    GeForce GT 430 (1GB)
    Primary Storage:
    Seagate1TB SATA2 - 7200rpm
    Monitor:
    Samsung 2333TN 23" 1920 x 1080 Full HD LCD Monitor2GW
    Discipline
    Architectural
    irneb's Discipline Details
    Occupation
    Architectural Technician and Programmer
    Discipline
    Architectural
    Using
    AutoCAD 2013
    Join Date
    Sep 2010
    Location
    Jo'burg SA
    Posts
    1,666

    Default

    Assuming you used Lee's code, then once it's loaded you should have a new command called MacDim. Just type it into the command-line. It'll ask you to select the dimension(s) and specify the alteration value.

    Edit: As a future tip: If there's a piece of code in the LSP file which starts with
    Code:
    (defun C:
    Then the word following it will be the command. Note it's possible that the word could have other characters in it (like - ), but no spaces. Basically acad looks at the name of the function when it's defined (defun = define function), if the name starts with C: then acad adds it as a custom lisp command, otherwise it's just a normal lisp function which you can also call but need to use lisp-like syntax.

    Also a LSP file may have many of these custom commands, not just one, so look through the whole code for new commands.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  4. #24
    Forum Newbie
    Using
    AutoCAD 2011
    Join Date
    Aug 2012
    Posts
    4

    Default

    than x irneb, much appreciated everything works well. Only problem i sthat after i use the macdim command my dimensions are no longer rounded off to 5 as they were before applying the command? Any thoughts on this?

  5. #25
    Super Member irneb's Avatar
    Computer Details
    irneb's Computer Details
    Operating System:
    Win7 Pro 64bit
    Computer:
    Antec One Hundred
    Motherboard:
    ASUS P8P67-Pro P67
    CPU:
    Intel i7 2600 @ 3.4GHz
    RAM:
    16GB-1600MHz
    Graphics:
    GeForce GT 430 (1GB)
    Primary Storage:
    Seagate1TB SATA2 - 7200rpm
    Monitor:
    Samsung 2333TN 23" 1920 x 1080 Full HD LCD Monitor2GW
    Discipline
    Architectural
    irneb's Discipline Details
    Occupation
    Architectural Technician and Programmer
    Discipline
    Architectural
    Using
    AutoCAD 2013
    Join Date
    Sep 2010
    Location
    Jo'burg SA
    Posts
    1,666

    Default

    That's because Lee's code overwrites the dim with a new computed string. His code would need some alteration to test these rounding of the dimension so it matches the original dim.

    Perhaps this:
    Code:
    (defun c:MacDim (/ ss num)
      (vl-load-com)
      (if (and (setq ss (ssget '((0 . "DIMENSION"))))
               (setq num (getreal "\nSpecify Alteration: ")))
        (mapcar
          (function
            (lambda (x)
              (vla-put-TextColor x 1) ; <<-- 1 = Red
                (vla-put-TextOverride x
                  (strcat
                    (vla-get-TextPrefix x)
                      (rtos (round (+ (vla-get-Measurement x) num)
                                   (vla-get-RoundDistance x))
                        (vla-get-UnitsFormat x)
                          (vla-get-PrimaryUnitsPrecision x))
                        (vla-get-TextSuffix x)))))
          (mapcar 'vlax-ename->vla-object
            (vl-remove-if 'listp
              (mapcar 'cadr (ssnamex ss))))))
      (princ))
    
    (defun round (num fact / mod)
      (if (< (setq mod (rem num fact)) (/ fact 2))
        (- num mod)
        (+ num (- fact mod))))
    Edit: Sorry, stupid mistake on my part ... in a rush!
    Last edited by irneb; 20th Aug 2012 at 11:38 am.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

  6. #26
    Forum Newbie
    Using
    AutoCAD 2011
    Join Date
    Aug 2012
    Posts
    4

    Default

    Registered forum members do not see this ad.

    awesome! thanx alot saving me lots of grey hairs.

Similar Threads

  1. Manipulating JPEGs in Autocad
    By Jovial in forum AutoCAD Beginners' Area
    Replies: 4
    Last Post: 9th Mar 2009, 03:50 pm
  2. Changing values in Linear Dimension
    By Evil_eyes in forum AutoCAD Beginners' Area
    Replies: 30
    Last Post: 9th Feb 2009, 11:43 pm
  3. How to convert Latitude / Longitude values in to Northing / Easting values in meters
    By Chenna Siva Koteswara rao in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 2
    Last Post: 28th Dec 2008, 11:09 pm
  4. Manipulating Autocad from Excel
    By Joro-- in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 17th Nov 2005, 11:01 pm
  5. Manipulating my background
    By hyposmurf in forum AutoCAD 3D Modelling & Rendering
    Replies: 14
    Last Post: 11th Jun 2004, 07:21 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts