<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PS:MS Scale Based on Nearest Set Scale in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643273#M110773</link>
    <description>&lt;P&gt;&lt;A href="https://www.screencast.com/t/ffqlkaIiS" target="_blank"&gt;https://www.screencast.com/t/ffqlkaIiS&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2017 22:01:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-21T22:01:03Z</dc:date>
    <item>
      <title>PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7640109#M110762</link>
      <description>&lt;P&gt;In paper space we zoom to our title block which is in model space using zoom-object. When we do that the object comes in close to scale (VPSCALE - PS:MS = 1:24.01428). Is there a way that I could create a lisp that will perform a zoom-object and then set the scale to the nearest set scale (PS:MS = 1:24). Our set scales would be 1:1, 1:2, 1:4, 1:8, 1:12, 1:16, 1:24, 1:32, 1:48, 1:64, 1:96. Any help on this would be great.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2017 22:54:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7640109#M110762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-20T22:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7641990#M110763</link>
      <description>&lt;P&gt;Is there a command or variable that will give me a reference of just the model space units after I zoom?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm thinking ZOOM nXP could work if I could reference the MS units. For example, once I zoom an object and the VPSCALE comes in at 1:24.01428, if I could TRUNCATE the MS value (24.01428 = 24) then I could continue the routine and set the nXP value to 1/'truncated_ms_value'XP. But I can't find a reference to MS units other than VPSCALE.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 14:45:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7641990#M110763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T14:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642453#M110764</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;In paper space we zoom to our title block which is in model space using zoom-object. When we do that the object comes in close to scale (VPSCALE - PS:MS = 1:24.01428). Is there a way that I could create a lisp that will perform a zoom-object and then set the scale to the nearest set scale (PS:MS = 1:24). Our set scales would be 1:1, 1:2, 1:4, 1:8, 1:12, 1:16, 1:24, 1:32, 1:48, 1:64, 1:96. Any help on this would be great.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try below code. Minimal testing and no error trap.&lt;/P&gt;
&lt;PRE&gt;(defun c:somefunc  (/ cvp dat3 ent etdata etdata2 ss1 zf)
 (and (zerop (getvar 'tilemode))
      (&amp;gt; (setq cvp (getvar 'cvport)) 1)
      (setq ent (car (entsel "\nSelect object to zoom to: ")))
      (vl-cmdf "._zoom" "_o" ent "")
      (setq ss1 (ssget "_x" (list '(0 . "viewport") (cons 69 cvp) (cons 410 (getvar 'ctab)))))
      (setq zf   (/ (cdr (assoc 41 (setq etdata (entget (setq ent (ssname ss1 0)))))) (cdr (assoc 45 etdata)))
            dat3 (mapcar '(lambda (x)
                           (cons (cdr (assoc 300 (setq etdata2 (entget (cdr x)))))
                                 (apply '/ (reverse (cdr (reverse (mapcar 'cdr (member (assoc 140 etdata2) etdata2))))))))
                         (vl-remove-if-not '(lambda (x) (= 350 (car x))) (dictsearch (namedobjdict) "ACAD_SCALELIST"))))
      (setpropertyvalue ent
                        "ViewHeight"
                        (/ (cdr (assoc 41 etdata))
                           (cdr (assoc (caar (vl-sort (mapcar '(lambda (x) (cons (car x) (abs (- zf (cdr x))))) dat3)
                                                      '(lambda (x y) (&amp;lt; (cdr x) (cdr y)))))
                                       dat3)))))
 (princ))&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zoom_object_scale.gif" style="width: 687px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/442043i68C7D2E48C13CFB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="zoom_object_scale.gif" alt="zoom_object_scale.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 16:32:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642453#M110764</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-12-21T16:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642624#M110765</link>
      <description>&lt;P&gt;Ranjit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code works great for zooming to scale. After testing though the CANNOSCALE remains unchanged. Is there a way to get it to set the CANNOSCALE to the zoomed scale?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 17:26:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642624#M110765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T17:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642659#M110766</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;Ranjit,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code works great for zooming to scale. After testing though the CANNOSCALE remains unchanged. Is there a way to get it to set the CANNOSCALE to the zoomed scale?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;OK. Try below code.&lt;/P&gt;
&lt;PRE&gt;(defun c:somefunc  (/ cvp dat3 ent etdata etdata2 sc ss1 zf)
 (and (zerop (getvar 'tilemode))
      (&amp;gt; (setq cvp (getvar 'cvport)) 1)
      (setq ent (car (entsel "\nSelect object to zoom to: ")))
      (vl-cmdf "._zoom" "_o" ent "")
      (setq ss1 (ssget "_x" (list '(0 . "viewport") (cons 69 cvp) (cons 410 (getvar 'ctab)))))
      (setq zf   (/ (cdr (assoc 41 (setq etdata (entget (setq ent (ssname ss1 0)))))) (cdr (assoc 45 etdata)))
            dat3 (mapcar '(lambda (x)
                           (cons (cdr (assoc 300 (setq etdata2 (entget (cdr x)))))
                                 (apply '/ (reverse (cdr (reverse (mapcar 'cdr (member (assoc 140 etdata2) etdata2))))))))
                         (vl-remove-if-not '(lambda (x) (= 350 (car x))) (dictsearch (namedobjdict) "ACAD_SCALELIST"))))
      (setpropertyvalue ent
                        "ViewHeight"
                        (/ (cdr (assoc 41 etdata))
                           (cdr (assoc (setq sc (caar (vl-sort (mapcar '(lambda (x) (cons (car x) (abs (- zf (cdr x))))) dat3)
                                                               '(lambda (x y) (&amp;lt; (cdr x) (cdr y))))))
                                       dat3)))))
 (somefunc2 ent sc)
 (princ))
(defun somefunc2  (x y / etdata)
 (setq etdata (cdr (assoc 360 (entget (cdr (assoc 360 (entget x)))))))
 (setq etdata (entget (cdr (assoc 340 (entget etdata)))))
 (entmod (subst (cons 300 y) (assoc 300 etdata) etdata)))&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zoom_object_scale_2.gif" style="width: 510px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/442072i6E1A13B6AE2770C2/image-size/large?v=v2&amp;amp;px=999" role="button" title="zoom_object_scale_2.gif" alt="zoom_object_scale_2.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 17:40:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642659#M110766</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-12-21T17:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642866#M110767</link>
      <description>&lt;P&gt;Ranjit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I run the new code, it adds new annotative scales and I can't delete them. Now, I have multiple annotative scales of 1/2" = 1'-0" with percentages of 4.17% and 8.33%.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12-21-2017 1-07-22 PM.jpg" style="width: 167px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/442105i60C52174FE1153CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="12-21-2017 1-07-22 PM.jpg" alt="12-21-2017 1-07-22 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 19:08:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642866#M110767</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T19:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642890#M110768</link>
      <description>&lt;P&gt;Actually, it's renaming the pspace anno scale to the mspace anno scale.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 19:15:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7642890#M110768</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T19:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643029#M110769</link>
      <description>&lt;P&gt;Is there anyway to have it perform "CANNOSCALE" after and have it reference the "Standard scale" as it shows in the properties for the viewport?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.screencast.com/t/og8bybymLkB" target="_blank"&gt;https://www.screencast.com/t/og8bybymLkB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 20:08:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643029#M110769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T20:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643049#M110770</link>
      <description>&lt;P&gt;Your suggestion might just do the trick. Try below code. Again there is no error trap and minimal testing so test it on a test drawing.&lt;/P&gt;
&lt;PRE&gt;(defun c:somefunc  (/ cvp dat3 ent etdata etdata2 sc ss1 zf)
 (and (zerop (getvar 'tilemode))
      (&amp;gt; (setq cvp (getvar 'cvport)) 1)
      (setq ent (car (entsel "\nSelect object to zoom to: ")))
      (vl-cmdf "._zoom" "_o" ent "")
      (setq ss1 (ssget "_x" (list '(0 . "viewport") (cons 69 cvp) (cons 410 (getvar 'ctab)))))
      (setq zf   (/ (cdr (assoc 41 (setq etdata (entget (setq ent (ssname ss1 0)))))) (cdr (assoc 45 etdata)))
            dat3 (mapcar '(lambda (x)
                           (cons (cdr (assoc 300 (setq etdata2 (entget (cdr x)))))
                                 (apply '/ (reverse (cdr (reverse (mapcar 'cdr (member (assoc 140 etdata2) etdata2))))))))
                         (vl-remove-if-not '(lambda (x) (= 350 (car x))) (dictsearch (namedobjdict) "ACAD_SCALELIST"))))
      (setpropertyvalue ent
                        "ViewHeight"
                        (/ (cdr (assoc 41 etdata))
                           (cdr (assoc (setq sc (caar (vl-sort (mapcar '(lambda (x) (cons (car x) (abs (- zf (cdr x))))) dat3)
                                                               '(lambda (x y) (&amp;lt; (cdr x) (cdr y))))))
                                       dat3)))))
 (command "._cannoscale" sc)
 (princ))&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Dec 2017 20:14:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643049#M110770</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-12-21T20:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643080#M110771</link>
      <description>&lt;P&gt;For some reason it is still making me select the annotation scale in order for the view port and annotation scales to match.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="12-21-2017 2-25-14 PM.jpg" style="width: 314px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/442130i8B6D040E6FDC73D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="12-21-2017 2-25-14 PM.jpg" alt="12-21-2017 2-25-14 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Sorry for being difficult.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 20:27:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643080#M110771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T20:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643209#M110772</link>
      <description>&lt;P&gt;&lt;BR /&gt;No need to be sorry. I am just not sure I understand &lt;EM&gt;it is still making me select the annotation scale in order for the view port and annotation scales to match&lt;/EM&gt;. Maybe post a screencast. Below is how it works at my end.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="zoom_object_scale_3.gif" style="width: 625px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/442148i00381EB762974BD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="zoom_object_scale_3.gif" alt="zoom_object_scale_3.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 21:27:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643209#M110772</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-12-21T21:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643273#M110773</link>
      <description>&lt;P&gt;&lt;A href="https://www.screencast.com/t/ffqlkaIiS" target="_blank"&gt;https://www.screencast.com/t/ffqlkaIiS&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 22:01:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643273#M110773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T22:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643282#M110774</link>
      <description>&lt;P&gt;My sincerest apologies... I did not examine the code closely enough and thought you had just entered (command "._cannoscale" sc) at the end of the routine... I copied it fresh and it ran perfectly. Sorry for assuming everything was the same except that line of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are a champ!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 22:10:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643282#M110774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-21T22:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643283#M110775</link>
      <description>&lt;P&gt;Glad it worked.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 22:11:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/7643283#M110775</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2017-12-21T22:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/8146189#M110776</link>
      <description>&lt;P&gt;Hello Ranjit,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this routine setup in a way that lines 4 and 5 could&amp;nbsp;replaced with a different code block to add an option for the user to select the zoom window manually instead of only selecting the object? Or would everything below the "setq ent..." line have to change to accomodate the two options?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you point me in the right direction as to how that could be done? Thanks for your time, this routine is a huge timesaver as is! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:somefunc  (/ cvp dat3 ent etdata etdata2 sc ss1 zf)
 (and (zerop (getvar 'tilemode))
      (&amp;gt; (setq cvp (getvar 'cvport)) 1)
      (setq ent (car (entsel "\nSelect object to zoom to: ")))   ;; these are the two lines i'm asking about
      (vl-cmdf "._zoom" "_o" ent "")                             ;; these are the two lines i'm asking about
      (setq ss1 (ssget "_x" (list '(0 . "viewport") (cons 69 cvp) (cons 410 (getvar 'ctab)))))
      (setq zf   (/ (cdr (assoc 41 (setq etdata (entget (setq ent (ssname ss1 0)))))) (cdr (assoc 45 etdata)))
            dat3 (mapcar '(lambda (x)
                           (cons (cdr (assoc 300 (setq etdata2 (entget (cdr x)))))
                                 (apply '/ (reverse (cdr (reverse (mapcar 'cdr (member (assoc 140 etdata2) etdata2))))))))
                         (vl-remove-if-not '(lambda (x) (= 350 (car x))) (dictsearch (namedobjdict) "ACAD_SCALELIST"))))
      (setpropertyvalue ent
                        "ViewHeight"
                        (/ (cdr (assoc 41 etdata))
                           (cdr (assoc (setq sc (caar (vl-sort (mapcar '(lambda (x) (cons (car x) (abs (- zf (cdr x))))) dat3)
                                                               '(lambda (x y) (&amp;lt; (cdr x) (cdr y))))))
                                       dat3)))))
 (command "._cannoscale" sc)
 (princ))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Jul 2018 18:26:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/8146189#M110776</guid>
      <dc:creator>Jeremiah.Dillashaw</dc:creator>
      <dc:date>2018-07-21T18:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: PS:MS Scale Based on Nearest Set Scale</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/8157833#M110777</link>
      <description>&lt;P&gt;Try replacing the 2 lines with this one&lt;/P&gt;&lt;PRE&gt;(null (command-s "._zoom" "_w"))&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Jul 2018 15:12:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/ps-ms-scale-based-on-nearest-set-scale/m-p/8157833#M110777</guid>
      <dc:creator>Ranjit_Singh</dc:creator>
      <dc:date>2018-07-26T15:12:34Z</dc:date>
    </item>
  </channel>
</rss>

