Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
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: 

Reprojection of multiple DWG

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
APRR_SITE_DIJON
2076 Views, 6 Replies

Reprojection of multiple DWG

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 🙂

 

Regards

Matthieu

6 REPLIES 6
Message 2 of 7

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..?

Message 3 of 7

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
Message 4 of 7
braudpat
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 !?

 

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 5 of 7
olivier.eckmann
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

Message 6 of 7
braudpat
in reply to: olivier.eckmann

Hello Olivier

 

BEAUTIFUL !

 

Patrice ( Supporting Troops ) - Autodesk Expert Elite
If you are happy with my answer please mark "Accept as Solution" and if very happy please give me a Kudos (Felicitations) - Thanks

Patrice BRAUD

EESignature


Message 7 of 7

Thanx Olivier and Patrice.

 

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

 

Best regards.

 

 

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

Post to forums  

Autodesk Design & Make Report