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:Ā 

Copy a shapefile layer style frome one to another

8 REPLIES 8
Reply
Message 1 of 9
TramVu
1702 Views, 8 Replies

Copy a shapefile layer style frome one to another

I was wondering if I can copy a shapefile layer style from one to another in the map work space just like how ESRI has the option of importing a layer style to another.

8 REPLIES 8
Message 2 of 9
parkr4st
in reply to: TramVu

You can save a .layer file which will contain the styles and drop into a new map to bring the style in. 

Message 3 of 9
hence_the_name
in reply to: TramVu

Hi,

 

if you want to apply one style to another SHP file (or different data surce in general) - that is not possible just with a mouse click. You can save a style in layer file but to apply the layer file to a different SHP you need to modify the layer file (xml) manually.

 

There is a small tool available for free - unfortunatly only for Map 2010 - that copies a layer style from one data source to another:

http://www.fig-tech.com/resources/  --> "Style Management"

 

The request for being able to copy a style to a different data source has come up a few times - maybe someone drops that company a line to ask if they would update their tool for newer Map versions or publish it as open source,

 

Good Luck, Rob

http://raumpatrouille3d.blogspot.ch/
Message 4 of 9

Hi,

 

free tool from Robert message works well on my MAP 3D 2012 64 bits (french)

 

Olivier

Message 5 of 9
TramVu
in reply to: hence_the_name

Thanks Rob!

 

Unfortunately I have AutoCAD Map3d 2013 and will be using 2014 in the near future.  It would be nice to get that company to upgrade their version for 2013 or 2014.

 

Tram

Message 6 of 9
braudpat
in reply to: TramVu

Hello

 

An other idea :

 

1) Export the FDO layer as a .layer file

 

2) Edit the XML file and changes the source informations ...

 

3) Import the .layer file

 

Bye, Pat

 

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 9
ouspensky
in reply to: braudpat

so which lines do i edit in the XML??  is there an article or step by step instructions? on how to do this?

Message 8 of 9
hence_the_name
in reply to: TramVu

Hi,

 

I'm not aware of a step by step guide.

 

You need to check at least <FeatureName> and <ResourceID>. If the column names are different you need to check the XML file for those as well.

 

In general - there is a (old) PDF file explaing the basics of a Map/MapGuide layer files. Search for "Building Symbol Libraries with Autodesk MapGuide" on the internet. The document covers the stylization aspect of layer files and doesn't say anything about data sources etc. But it's the only good introduction I'm aware of. It's certainly helpful if you want to modify xml layer files.

 

Further information can be found in the XML definition for the layer file type:

 

http://trac.osgeo.org/mapguide/browser/branches/2.1/MgDev/Common/Schema/LayerDefinition-1.3.0.xsd

 

1.3.0 is not the latest version but I can't find a better link. When you save your layer as XML it will show you the release number your Map version supports (e.g.: xsi:noNamespaceSchemaLocation="LayerDefinition-2.4.0.xsd" ). It contains few information about what the xml tags mean in a layer file.

 

Good luck, Rob

 

 

 

 

 

http://raumpatrouille3d.blogspot.ch/
Message 9 of 9
ouspensky
in reply to: hence_the_name

A step by step guide to copy a layer style

1. in display manger savesas layer

2. open that .layer file in notepad

3. use FIND REPLACE to change all the connection names  For example FIND "SDF_1" REPLACE "SDF_2" (the cube icon in leftpane)

4. use FIND REPLACE to change all the class names For example FIND "LanduseOld" REPLACE "LanduseNew" (the cube or paper icon in right pane)

5. scroll down to the bottom and look for <FeatureName> tag there should be a path somewhere between <FeatureName> and </FeatureName>

6. Change the path to wherever your GIS datastore is

7. If the original datastore is, for example, a Shapfile and the new datastore is SDF you need to change the contents of the FDO provider tag too

8. saveas a new .layer file

9. in display manger choose load layer

 

One thing I found was to make sure the filename and the class name are the same so it is less find+replace work for you.  IF this is unclear I can post some screen shots or a video

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

Post to forums  

Autodesk Design & Make Report

ā€Boost