Annotative Block has NO annotation scales!?

Annotative Block has NO annotation scales!?

hencoop
Advisor Advisor
941 Views
2 Replies
Message 1 of 3

Annotative Block has NO annotation scales!?

hencoop
Advisor
Advisor

I have a block that I insert via a lisp routine that IS annotative but has NO annotative scales associated with it.  My lisp routine has been successfully inserting these blocks with an annotation scale without a problem for years and it did some in this same drawing last week.  The blocks are placed every 100' along an alignment with their direction pointing downstream relative to the surface at their insertion point.

 

This is a new and unexpected behavior and as a result it does not display and cannot be displayed until an annotation scale is associated with it.  How is this happening?  How can I prevent it from happening or force an annotation scale for the inserted block? I was able to select it by using SELECT and LAST.

 

Any help will be greatly appreciated.

 

Here are its properties in which it seems to have an annotation scale of 1"=1'; however,

BlockProperties.jpg

 

When editing the Annotation Scale is attempted from the properties dialog The list of annotation scales is empty.

ObjectScaleList.jpg

 

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
0 Likes
942 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

you can add a scale to the block in the annotation object scale dialog box. If you can select one of the boxes and select similar, you can add scale to all at once. I will say that your scale of 1"-1'-0" is a dimscale of twelve and any block that is annotated and spaced at 100' and scaled down to 1:12 may be small.

0 Likes
Message 3 of 3

hencoop
Advisor
Advisor

Thank you for you reply.

 

The annotative scale displays in the properties dialog as indicated; however, via program I am able to establish that it in fact has NO annotation scales associated with it.  This fact causes the block to not appear at all.

 

What I needed was a way to add an annotation scale via program.  I was able to develop what I needed from some other sources on this forum mostly originating from Lee Mac's code.

 

(DEFUN set-anno-scale (the-ss / )
  (VL-LOAD-COM)
  (setq old_cmdecho (getvar "CMDECHO"))
  (setq canscl (getvar 'cannoscale))
  (repeat (setq index (sslength the-ss))
    (if (setq ename (ssname the-ss (setq index (1- index))))
      (progn
        (setq scl_lst
               (progn
                 (if
                   (and
                     (setq entdata (entget ename))
                     (setq dicts (cdr (assoc 360 (cdr (member '(102 . "{ACAD_XDICTIONARY") entdata)))))
                     (setq dicts (cdr (assoc -1 (dictsearch dicts "acdbcontextdatamanager"))))
                     (setq dicts (cdr (assoc -1 (dictsearch dicts "acdb_annotationscales"))))
                   ) ;_ end of and
                    (while (setq item (dictnext dicts (not item)))
                      (setq scl_lst (cons (cdr (assoc 300 (entget (cdr (assoc 340 item))))) scl_lst))
                    ) ;_ end of while
                 ) ;_ end of if
                 (reverse scl_lst)
               ) ;_ end of progn
        ) ;_ end of setq
        (if (or (not scl_lst) (not (member canscl scl_lst)))
          (command "_.-objectscale" ename "" "_a" canscl "")
        ) ;_ end of if
        (if (setq scl_lst (vl-remove-if '(lambda (item) (= item canscl)) scl_lst))
          (progn
            (command "_.-objectscale" ename "" "_d")
            (foreach item scl_lst (command item))
            (command "")
          ) ;_ end of progn
        ) ;_ end of if
        (SETQ insobj (VLAX-ENAME->VLA-OBJECT ename))
        (VLAX-PUT-PROPERTY insobj 'XEffectiveScaleFactor 1.0)
        (VLAX-PUT-PROPERTY insobj 'YEffectiveScaleFactor 1.0)
        (VLAX-PUT-PROPERTY insobj 'ZEffectiveScaleFactor 1.0)
      ) ;_ end of progn
    ) ;_ end of if
  ) ;_ end of repeat
  (setvar "CMDECHO" old_cmdecho)
  (princ)
) ;_ end of DEFUN

I am still needing to refine it so that truly non-annotative inserts merely have their scale set since the annotative factors don't apply to them.  Testing the acad_dictionary for the existence of "acdb_annotationscales" does not work because the objects of my post are annotative but have no "acdb_annotationscales" at all.

 

 

AutoCAD User since 1989. Civil Engineering Professional since 1983
Product Version: 13.6.1963.0 Civil 3D 2024.4.1 Update Built on: U.202.0.0 AutoCAD 2024.1.6
                        27.0.37.14 Autodesk AutoCAD Map 3D 2024.0.1
                        8.6.52.0 AutoCAD Architecture 2024
0 Likes