AutoCAD Map 3D Forum
Welcome to Autodesk’s AutoCAD Map 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

annotative blocks and the mapimport command

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
Anonymous
1779 Views, 7 Replies

annotative blocks and the mapimport command

I am trying to use an annotative block to replace the point data in an esri shape file when I import the shape file, Autocad says it imported fine but I cannot see the blocks (annotative scale is set the same in both the block dwg and the drawing I am trying to import into and annotation visibility is set to show all). If I do a quick select using the block name as the filter, Autocad finds them, (After a very, very, very long time) but I don't know where....I can't seem to find them manually in either paperspace or modelspace. The mapimport works fine when using the old non-annotative block (the blocks are just simple symbols for a well head, a circle,  some hatching and a few lines) I am actually using civil 3d 2012, but others in the company run map 3d 2012. The annotative block works fine when simply inserted, or dragged and dropped from the design center.

 

Anybody have any ideas? Anyone else having the same problem?

7 REPLIES 7
Message 2 of 8
jefferyjensen
in reply to: Anonymous

I have the same problem using AutoCAD Civil 3D 2018. So it appears MAPIMPORT does NOT support annotative blocks.

 

No mention of this in AutoCAD Map 3D 2017 help - To Import SHP Files

 

"Map 3D freezes when using MAPIMPORT or MAPEXPORT with some SHP files." see New in This Release AutoCAD Map 3D 2018

 

In my case AutoCAD isn't freezing, just doesn't display and/or import the points and assign annotative point block symbols.

 

Thanks for any help on this,

 

Jeff Jensen

Message 3 of 8

Hello,

 

I also tried using BLOCKREPLACE express tool but this also does NOT work with annotative blocks.

 

So my current workaround on import point shapefiles (shp) is

 

1) MAPIMPORT with Points - assign a standard (non-annotative) block

2) BSCALE express tool to manually scale my blocks to say 1"=40'. Then if I change my viewport scale to 1"=20' then run BSCALE again set absolute scale to 20.

2b) if changing becomes to cumbersome, then I will duplicated the blocks on another layer with the alternate scale. Then I just have to turn on/off layers depending upon my viewport scale.

 

Jeez, sure would be nice if Autodesk staff made this a priority and fix this issue with annotative blocks and MAPIMPORT and BLOCKREPLACE.

 

Jeff Jensen

 

Message 4 of 8
Murph_Map
in reply to: jefferyjensen


jeffjensen wrote:

 

Jeez, sure would be nice if Autodesk staff made this a priority and fix this issue with annotative blocks and MAPIMPORT and BLOCKREPLACE.

 

Jeff Jensen

 


As you see the Autocad annotative blocks do not work well in Map3D. Autodesks answer is to use Data Connect to the shp files and set the blocks/view size there. 

If you are dead set on using Mapimport to bring in shp files and use blocks there are ways to get what you want by using different maps and queries in the Display tab of the Map Task Pane. 

Murph
Supporting the troops daily.
Message 5 of 8
O_Eckmann
in reply to: jefferyjensen

Hi,

 

after MAPIMPORT with annotative block, you just have to save, then close your drawing, anf finally reopen it. Blocks appear.

 

Olivier

Olivier Eckmann

EESignature

Message 6 of 8
jefferyjensen
in reply to: O_Eckmann

That worked Olivier. Thanks. I new it was something obvious like saying "Open Sesame" from Ali Baba and the Forty Thieves while standing on my head. Smiley Tongue

Message 7 of 8

There is also a .lsp available to change selected points to blocks.

Note: this .lsp wasn't written by me, it is one of the .lsp files we have in your library and was found online (don't know who wrote it)

(defun c:pt2block(;		replace points with blocks
  /;				no arguments
  attreq;			value to restore
  cmdecho;			value to restore
  bname;			block name to insert
  temp;				temp variable
  ent;				entity name
  elist;			entity list
  scf;				insertion scale factor
  rotang;			insertion rotation angle
  ss1;				selection set of points
  indx;				index through selection set
  sslen;			number of points selected
  inspt;			insertion point
 );				end of local variable list
 (if (and
   (setq
    bname (getstring "\nName of block to insert: ")
    temp (/= "" bname)
   )
   (progn
    (if (or
      (tblsearch "BLOCK" bname);	the block exists in the drawing
      (findfile (strcat bname ".dwg"));	the block can be pulled from disk
     );				end or
     T;				continue
     (progn
      (alert (strcat "Block " bname " not found."))
      nil
     );				end progn
    );				end if block found?
   );				end progn check for block
   (setq scf (getreal "\nInsertion scale factor: "))
   (setq rotang (getangle "\nInsertion rotation angle: "))
   (setq
    ss1 (ssget
     '((0 . "POINT");		get points
       (-4 . "<NOT");		not on 
        (8 . "DEFPOINTS");	layer DEFPOINTS
       (-4 . "NOT>");		end not
      );			end the quoted filter list
     );				end ssget
    temp (if (and ss1 (< 0 (sslength ss1)));	was anything selected
     T
     (setq 
      ss1 (ssget
       "X"
       '((0 . "POINT");		get points
        (-4 . "<NOT");		not on 
         (8 . "DEFPOINTS");	layer DEFPOINTS
        (-4 . "NOT>");		end not
       );			end the quoted filter list
      );			end ssget
     );				end setq (nested)
    );				end if?
   );				end setq (outer)
   (if (< 0 (sslength ss1))
    T
    (progn
     (alert "No points found.")
     nil
    );				end progn
   );				end if points found?
  );				end and
  (progn
   (setq
    attreq (getvar "attreq");	value to restore
    cmdecho (getvar "cmdecho");	value to restore
    indx -1;			a counter
    sslen (sslength ss1);	number of points selected
   )
   (setvar "attreq" 0)
   (setvar "cmdecho" 0)
   (while (> sslen (setq indx (1+ indx)))
    (setq
     ent (ssname ss1 indx);	entity name
     elist (entget ent);		entity list
     inspt (cdr (assoc 10 elist));location of the point
     inspt (trans inspt ent 1)
    );				end setq
    (entmake
     (list
      '(0 . "INSERT")
      (cons 2 bname)
      (assoc 8 elist)
      (cons 10 inspt)
      (cons 41 scf)
      (cons 42 scf)
      (cons 43 scf)
      (cons 50 (* rotang (/ pi 180)))
      (assoc 210 elist)
     );				end list
    );				end entmake
    (entdel ent);		get rid of the point
    (princ ".");			indicate progress
   );				end while
   (setvar "attreq" attreq)
   (princ (strcat "\t" (itoa sslen) " points replaced. "))
   (command "_.redraw")
   (setvar "cmdecho" cmdecho)
  );				end progn
 );				end if valid input?
 (princ)
);				end c:pt2block 
Message 8 of 8
BrianHailey
in reply to: Anonymous

Still an issue in 2024. My solution was to import the points as blocks, select the blocks that were just imported using the QSELECT command, and then manually adding the current annotation scale to the blocks. Closing and reopening still works.

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report