AutoCAD Map 3D General

Reply
Active Member
APRR_SITE_DIJON
Posts: 7
Registered: ‎05-17-2006
Message 1 of 7 (389 Views)
Accepted Solution

Reprojection of multiple DWG

389 Views, 6 Replies
03-05-2014 12:54 AM

Hello guys,

 

I have a lot of dwg files (more than 100) that I need to reproject from IGN-II-Grid to RGF93.CC46

 

I know there is a way to reproject One DWG at a time (create new file > set coordinate system, meters unit and source CoordSys > Query with all > save)

This

 

This method works well but this is tedious work for more than 100 dwg.

 

So, my question is : Do you have a routine or a batch script that I can use to reproject multiple Dwg (same source CoordSys, same target CoordSys) ?

 

I know there is "AC Batch Reprojection Utility" that has been developped by Autodesk Consulting but they are unable to provide me this script....

 

Hope somebody can help :smileyhappy:

 

Regards

Matthieu

*Expert Elite*
antoniovinci
Posts: 1,590
Registered: ‎06-03-2011
Message 2 of 7 (379 Views)

Re: Reprojection of multiple DWG

03-05-2014 01:41 AM in reply to: APRR_SITE_DIJON

Bonjour, monsieur.

In an empty drawing, set the CRS as IGN-II-Grid, then do a simple script like this:

 

_-INSERT drawing1. dwg ...

_-INSERT drawing2. dwg ...

...

_-INSERT drawing100. dwg ...

 

then save all as "IGN-II-Grid.dwg".

 

Afterwards, in an empty drawing, set the CRS as RGF93.CC46, attach the above "IGN-II-Grid.dwg", finally perform the draw query.

 

Maybe it's not what you're after (i.e. 100 single drawings in RGF93.CC46 system), but better than manually reprojecting all, isn't it..?

Active Member
APRR_SITE_DIJON
Posts: 7
Registered: ‎05-17-2006
Message 3 of 7 (377 Views)

Re: Reprojection of multiple DWG

03-05-2014 01:46 AM in reply to: antoniovinci
Thanks for your Reply Antonio,

Unfortunatly, I am looking for a way to get single drawings as an output.

Your solution cannot work because it would be tedious too to also cut back 100 dwg files from a large single RGF93.CC46 drawing.

Regards
*Expert Elite*
braudpat
Posts: 1,866
Registered: ‎12-15-2006
Message 4 of 7 (345 Views)

Re: Reprojection of multiple DWG

03-05-2014 10:09 AM in reply to: APRR_SITE_DIJON

 

Hello Matthieu

 

Unfortunately AutoCAD MAP 20xx can reproject N DWGs to ONE DWG ONLY !

or you will have to reproject ONE BY ONE which is very time consumming ...

 

The French IGN has developped since a few years a Free Tool (IGNMAP) able to reproject N files (Automatic Batch mode) in DXF or SHP or MIF-MID or GC or xxx Format

which are in ONE folder - for example : "C:\DXFINPUT"

to an OTHER folder - for example : "C:\DXFOUTPUT"

 

This Reprojection Free Tool is able to use the "good old" Lambert 1/2/3/4/ET and of course ALL the New Lambert RGF93 : L93 France Entiere (whole country)  and the NINE L93 CCxx

 

A lot of people are using in France this Free Tool ...

For example ALL people with an AutoCAD LT or with an "classic" AutoCAD ... 

 

Please try this Free Tool ! And let us konw if you are satisfied !?

 

 

Bye, Pat

Distinguished Contributor
olivier.eckmann
Posts: 146
Registered: ‎02-14-2009
Message 5 of 7 (333 Views)

Re: Reprojection of multiple DWG

03-05-2014 11:51 AM in reply to: braudpat

Bonjour,

 

Open a DWG

Specify CC46 to this drawing

Attach your X dwg to the source drawing and specify the IGN.II for these base drawing

Load this lisp and execute RPV at command line

(defun C:RPV ()
  ;récupère la liste des chemins et des noms des dessins puis détache
  (foreach dwg_id (ade_dslist)
    (setq ListDwgName (append ListDwgName (list (ade_dwgactualpath dwg_id))))
    (ade_dsdetach dwg_id)
  )
  ;définit la requette Emplacement tout en mode dessiner
  ;(ade_qrydefine (list "" "" "" "Location" ("All")  ""))
  (ade_qrydefine '("" "" "" "Location" ("All") "" ) )
  (ade_qrysettype "draw")
  ;boucle d'attachement des dessins 1 par 1
  (foreach dwg_name ListDwgName
    (ade_dsattach dwg_name)
    ;exécute la requète
    (ade_qryexecute)
    ;détache le dessinn
    (foreach dwg_id (ade_dslist) (ade_dsdetach dwg_id))
    ;crée le nom du dessin de sortie
    (setq dwg_name_export (strcat (substr dwg_name 1 (- (strlen dwg_name) 4)) "_BIS.DWG"))
    ;zoom étendu
    (command "zoom" "et")
    ;exporte les objets extraits vers le nouveau dessin
    (command "sauvegrd" dwg_name_export)
    ;supprime tous les objets du dessin
    (command "effacer" "tout" "")
  )
)
 

This lisp find all attached DWG, load first, execute query "Emplacement Tout", save as DWG with same name with sufix _BIS, erase all entities and proceed to next drawing

 

Sorry for non french people, but command are french instead of international. I could change if necessary

 

Olivier

*Expert Elite*
braudpat
Posts: 1,866
Registered: ‎12-15-2006
Message 6 of 7 (329 Views)

Re: Reprojection of multiple DWG

03-05-2014 12:07 PM in reply to: olivier.eckmann

Hello Olivier

 

BEAUTIFUL !

 

Bye, Pat

Active Member
APRR_SITE_DIJON
Posts: 7
Registered: ‎05-17-2006
Message 7 of 7 (314 Views)

Re: Reprojection of multiple DWG

03-06-2014 12:21 AM in reply to: APRR_SITE_DIJON

Thanx Olivier and Patrice.

 

Both solutions are working and can be applied in a fast and efficient way !

 

Best regards.

 

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community