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: 

Change width of lines (hatch symbol)

13 REPLIES 13
SOLVED
Reply
Message 1 of 14
swt-gis
6552 Views, 13 Replies

Change width of lines (hatch symbol)

I want to display areas with hatch. But I can not change the width of the lines. The left image shows the current hatch.

I use AutoCAD Map 3D 2013 with an FDO datasource (SQLITE).

 

The right image shows the hatch with thicker lines:

desired_symbol.jpg

 

screenshot_dialog.jpg

 

 

Tags (4)
13 REPLIES 13
Message 2 of 14
rmacan
in reply to: swt-gis

I'm not aware of a way to do this in the FDO display styles.  This is just one of a number of problems and shortcomings with MAP that I've experienced....don't get me started.
My workaround is really dumb.  I import the shapefile or whatever file it is using MAPIMPORT, display it as MPolygons, and style the fill as a line.  Then I'm able to adjust the lineweight via layer properties.  But since it's static, it's not what I would consider an ideal method. 
I wonder if anyone else has a better way?

Message 3 of 14
Anonymous
in reply to: rmacan

Hi Jens,

 

you can set a lineweigth for a FDO hatch pattern - but not in StyleEditor.

 

1. save layer as XML (context menu)

2. add a lineweight parameter in the PATH section of the hatch geometry (see screenshot)

3. add a lineweigth sub-section in OVERWRITE section accordingly (see screenshot)

4. load XML file (drag and drop with Win Explorer)

 

I added another example of more complex hatches as well - possible when you are willing to  work with XML files.

 

XML file is attached as well.

 

Good luck, Rob

 

ansi_1.pngansi hatch

 

ansi_2.png

add <LineWeight>...

 

 

ansi_3.png

add Override

 

ansi_4.png

 

reload layer file

 

 

hatch1.png

 

more complex hatches for fdo features

 

Message 4 of 14
Anonymous
in reply to: Anonymous

and the xml file as well - just the layerdefintion bit:

 

      <LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="LayerDefinition-2.4.0.xsd" version="2.4.0">
        <VectorLayerDefinition>
          <ResourceId>fsd://bb_gebaeude_20140205</ResourceId>
          <FeatureName>Default:bb_gebaeude_20140205</FeatureName>
          <FeatureNameType>FeatureClass</FeatureNameType>
          <Geometry>Geometry</Geometry>
          <VectorScaleRange>
            <CompositeTypeStyle>
              <CompositeRule>
                <LegendLabel></LegendLabel>
                <CompositeSymbolization>
                  <SymbolInstance>
                    <SimpleSymbolDefinition>
                      <Name>ANSI31</Name>
                      <Graphics>
                        <Path>
                          <Geometry>M 0.0,0.0 h 10.0</Geometry>
                          <ScaleX>%StyleEditorGenerated_ScaleX_0%</ScaleX>
                          <ScaleY>%StyleEditorGenerated_ScaleY_0%</ScaleY>
                          <LineColor>%HATCHCOLOR%</LineColor>
						  <LineWeight>%LINEWEIGHT%</LineWeight>                        </Path>
                      </Graphics>
                      <AreaUsage>
                        <Angle>%HATCHANGLE%</Angle>
                        <RepeatX>141.42002679694</RepeatX>
                        <RepeatY>1.76776829534107</RepeatY>
                      </AreaUsage>
                      <ParameterDefinition>
                        <Parameter>
                          <Identifier>HATCHCOLOR</Identifier>
                          <DefaultValue>0xff000000</DefaultValue>
                          <DisplayName>&amp;Schraffurfarbe</DisplayName>
                          <Description>Farbe des Schraffurstils</Description>
                          <DataType>LineColor</DataType>
                        </Parameter>
                        <Parameter>
                          <Identifier>HATCHANGLE</Identifier>
                          <DefaultValue>45.0</DefaultValue>
                          <DisplayName>&amp;Schraffurwinkel</DisplayName>
                          <Description>Drehwinkel für den Schraffurstil</Description>
                          <DataType>Angle</DataType>
                        </Parameter>
                        <Parameter>
                          <Identifier>StyleEditorGenerated_ScaleX_0</Identifier>
                          <DefaultValue>1.0</DefaultValue>
                          <DisplayName>Pfad Skalierfaktor X</DisplayName>
                          <Description>Pfad Skalierfaktor X</Description>
                          <DataType>Real</DataType>
                        </Parameter>
                        <Parameter>
                          <Identifier>StyleEditorGenerated_ScaleY_0</Identifier>
                          <DefaultValue>1.0</DefaultValue>
                          <DisplayName>Pfad Skalierfaktor Y</DisplayName>
                          <Description>Pfad Skalierfaktor Y</Description>
                          <DataType>Real</DataType>
                        </Parameter>
                      </ParameterDefinition>
                      <ExtendedData1>
                        <FileName>acad.pat</FileName>
                      </ExtendedData1>
                    </SimpleSymbolDefinition>
                    <ParameterOverrides>
                      <Override>
                        <SymbolName>ANSI31</SymbolName>
                        <ParameterIdentifier>HATCHCOLOR</ParameterIdentifier>
                        <ParameterValue>0xff000000</ParameterValue>
                      </Override>
					  <Override>
                        <SymbolName>ANSI31</SymbolName>
                        <ParameterIdentifier>LINEWEIGHT</ParameterIdentifier>
                        <ParameterValue>1</ParameterValue>
                      </Override>                      <Override>
                        <SymbolName>ANSI31</SymbolName>
                        <ParameterIdentifier>HATCHANGLE</ParameterIdentifier>
                        <ParameterValue>45.0</ParameterValue>
                      </Override>
                      <Override>
                        <SymbolName>ANSI31</SymbolName>
                        <ParameterIdentifier>StyleEditorGenerated_ScaleX_0</ParameterIdentifier>
                        <ParameterValue>14.1420309637559</ParameterValue>
                      </Override>
                      <Override>
                        <SymbolName>ANSI31</SymbolName>
                        <ParameterIdentifier>StyleEditorGenerated_ScaleY_0</ParameterIdentifier>
                        <ParameterValue>14.1420309637559</ParameterValue>
                      </Override>
                    </ParameterOverrides>
                    <UsageContext>Area</UsageContext>
                    <GeometryContext>Polygon</GeometryContext>
                  </SymbolInstance>
                  <SymbolInstance>
                    <SimpleSymbolDefinition>
                      <Name>SOLID</Name>
                      <Description>SOLID</Description>
                      <Graphics>
                        <Path>
                          <Geometry>M 0.0,0.0 h 4.0</Geometry>
                          <ScaleX>%StyleEditorGenerated_ScaleX_0%</ScaleX>
                          <ScaleY>%StyleEditorGenerated_ScaleY_0%</ScaleY>
                          <LineColor>%LINECOLOR%</LineColor>
                          <LineWeight>%LINEWEIGHT%</LineWeight>
                          <LineWeightScalable>false</LineWeightScalable>
                        </Path>
                      </Graphics>
                      <LineUsage>
                        <Repeat>4.0</Repeat>
                      </LineUsage>
                      <ParameterDefinition>
                        <Parameter>
                          <Identifier>LINECOLOR</Identifier>
                          <DefaultValue>ff000000</DefaultValue>
                          <DisplayName>Linien&amp;farbe</DisplayName>
                          <Description>Line Color</Description>
                          <DataType>LineColor</DataType>
                        </Parameter>
                        <Parameter>
                          <Identifier>LINEWEIGHT</Identifier>
                          <DefaultValue>0.0</DefaultValue>
                          <DisplayName>Liniens&amp;tärke</DisplayName>
                          <Description>Line Thickness</Description>
                          <DataType>LineWeight</DataType>
                        </Parameter>
                        <Parameter>
                          <Identifier>StyleEditorGenerated_ScaleX_0</Identifier>
                          <DefaultValue>1.0</DefaultValue>
                          <DisplayName>Pfad Skalierfaktor X</DisplayName>
                          <Description>Pfad Skalierfaktor X</Description>
                          <DataType>Real</DataType>
                        </Parameter>
                        <Parameter>
                          <Identifier>StyleEditorGenerated_ScaleY_0</Identifier>
                          <DefaultValue>1.0</DefaultValue>
                          <DisplayName>Pfad Skalierfaktor Y</DisplayName>
                          <Description>Pfad Skalierfaktor Y</Description>
                          <DataType>Real</DataType>
                        </Parameter>
                      </ParameterDefinition>
                    </SimpleSymbolDefinition>
                    <ParameterOverrides>
                      <Override>
                        <SymbolName>SOLID</SymbolName>
                        <ParameterIdentifier>LINECOLOR</ParameterIdentifier>
                        <ParameterValue>ff000000</ParameterValue>
                      </Override>
                      <Override>
                        <SymbolName>SOLID</SymbolName>
                        <ParameterIdentifier>LINEWEIGHT</ParameterIdentifier>
                        <ParameterValue>0</ParameterValue>
                      </Override>
                      <Override>
                        <SymbolName>SOLID</SymbolName>
                        <ParameterIdentifier>StyleEditorGenerated_ScaleX_0</ParameterIdentifier>
                        <ParameterValue>1.0</ParameterValue>
                      </Override>
                      <Override>
                        <SymbolName>SOLID</SymbolName>
                        <ParameterIdentifier>StyleEditorGenerated_ScaleY_0</ParameterIdentifier>
                        <ParameterValue>1.0</ParameterValue>
                      </Override>
                    </ParameterOverrides>
                    <GeometryContext>Polygon</GeometryContext>
                  </SymbolInstance>
                </CompositeSymbolization>
              </CompositeRule>
              <ShowInLegend>true</ShowInLegend>
            </CompositeTypeStyle>
          </VectorScaleRange>
        </VectorLayerDefinition>
      </LayerDefinition>

 

Message 5 of 14
swt-gis
in reply to: Anonymous

Hi Robert,

 

many thanks for the solution.

 

Jens

Message 6 of 14
Anonymous
in reply to: Anonymous

Robert,

 

I am trying to follow your instructions, but I'm guessing I'm not working with the same file types or something because I don't see a context menu item for saving a layer as XML.  I was hoping you could help me figure out where I'm going wrong.  I'm using AutoCAD Map 3D 2013 and AutoDesk Infrastructure Map Server 2015.  In AutoCAD I have a layer of polygons that I manually drew using the PLINE command, representing lease tracts.  I export those polygons using the MAPEXPORT command.  Usually I export to SHP files and then connect to those shape files through Infrastructure Studio 2015 to build my interactive web based map.  In styling the layer, I use an ANSI31 hatch to fill the shape if needed.  I tried exporting to an FDO SQLite file and connecting to that in Infrastructure Studio, but still can't find anything to save a layer as an XML file, in AutoCAD or Infrastructure Studio.  Can you tell me what I'm doing wrong?

 

Thanks,

Richard

Message 7 of 14
rmacan
in reply to: Anonymous

Richard,

Robert: Since I'm in here already, I'll try to answer it.  Feel free to add to it if I made a mistake.
In the Display Manager, your shapefile with the hatch styling should be listed.  If you hover your cursor over it and right-click your mouse, a list of options should appear.  One of them is "Save Layer".  Save it whereever, and then open it up in a text editor like Notebook ++ or similar.  This is where you can alter the lineweight by following the steps in Robert's reply.  Then, save the file (overwrite or a new one with the *.layer extension, go back to Display Manager in MAP3D, remove the original shapefile from your drawing, then right-click over the Data icon in the upper left, and select "Load layer" and locate your *.layer file you just altered.  It will then pull the shapefile back in with the styling alteration you wanted.

This method also works for a variety of other alterations to other files added in the Data Connection dialog box.

 

Randy

 

Message 8 of 14
Anonymous
in reply to: rmacan

Randy,

 

Thanks for the quick reply! So if I understand correctly, I've got to first export my PLINEs to a shapefile, then connect to the shapefile data, then I can follow Robert's instructions.  Am I right?

 

Also, this appears to allow me to change the linewidth of the hatch in AutoCAD, but will that transfer over to Infrastructure Studio for the web version of the map?

 

Thanks,

Richard

Message 9 of 14
Anonymous
in reply to: Anonymous

Hi Richard,

 

yes, you are right.

 

When you publish your drawing with the modified layer to AIMS these modifications will be retained.

 

Rob

Message 10 of 14
Anonymous
in reply to: Anonymous

Gentlemen,

 

Thanks for your help with this last week.  I was able to get the thicker hatch lines on a layer and I was able to get it published to our AIMS map with the thicker hatch lines.  This morning, while updating the layer, I followed the same process (at least I thought I did), and although the thicker hatch lines are showing up in the legend, they are no longer showing up as thick lines in the drawing or on the published map when I publish it.

 

I'm attaching a screenshot of the legend and map area showing the hatches, as well as the portion of the layer definition xml file that I changed.

 

Any help you could give would be greatly appreciated!

 

Thanks,


Richard

Message 11 of 14
Anonymous
in reply to: Anonymous

Nevermind...I found the problem.  I'm not sure why, when I saved the layer this time as xml, it had different settings for some of the other parameters.  I matched them all to the one I had working the other day and it worked.


Thanks again for the help last week!

 

Richard

Message 12 of 14
Anonymous
in reply to: Anonymous

@Anonymous 

 

you wrote:



you can set a lineweigth for a FDO hatch pattern - but not in StyleEditor.

1. save layer as XML (context menu)

 

Where? From which menu? I can save layers only as "*.layer"

Message 13 of 14
rmacan
in reply to: Anonymous

A .layer file is in XML format.  Open the .layer file in an editor like Notepad++ and the first line should read something like:

<?xml version="1.0" encoding="utf-8"?>

 

 

Message 14 of 14
Anonymous
in reply to: rmacan


@rmacan  schrieb:

A .layer file is in XML format.  Open the .layer file in an editor like Notepad++ and the first line should read something like:

<?xml version="1.0" encoding="utf-8"?>

 

 


Yes, that's clear. But there are different file-options to import, and therefore I suppose that the "XML-Files" have other content than the layer-files (which contains many information which is not needed if you only want to import a line-style)

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

Post to forums  

Technology Administrators


AutoCAD Beta