<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div>Hi,</div><div>You could create and save a style based on the attributes.</div><div><a href="https://gis.stackexchange.com/questions/20404/assign-multiple-colors-to-features-within-a-single-vector-layer">https://gis.stackexchange.com/questions/20404/assign-multiple-colors-to-features-within-a-single-vector-layer</a></div><div><br></div><div>I am surprised that Qgis can use the styles found in the dxf.</div><div>Nicolas </div><div><br>Le 5 juin 2018 à 06:37, Pedro Amaro (Infratec) <<a href="mailto:pedro.amaro@infratec.pt">pedro.amaro@infratec.pt</a>> a écrit :<br><br></div><blockquote type="cite"><div>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EstiloCorreioEletrnico17
        {mso-style-type:personal-compose;
        font-family:"Trebuchet MS",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif">Hello.<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif">I am trying to create a .kml file with the information contained in a .dxf file.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif">I already can upload the .dxf file to QGIS and keep the dxf’s layers’ information. Also, QGIS presents the .dxf drawing with its original colours.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif">I also can create the corresponding .kml file. The problem is that this .kml file presents every element with one colour only. I can select manually different colours for different .dxf’s layers, but usually I have dozens of layers and doing so manually takes a really long time. Is there anyway I can create the .kml file keeping the .dxf’s colours, as QGIS presents? I do not know if it is useful, but I have an attribute that has the RGB colour.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif"><o:p> </o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif">Thanks!<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif;color:black;mso-fareast-language:PT"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif;color:black;mso-fareast-language:PT">Com os melhores cumprimentos | Best regards | Saludos cordiales</span><span style="font-size:12.0pt;font-family:"Trebuchet MS",sans-serif;mso-fareast-language:PT"><o:p></o:p></span></p><p class="MsoNormal"><span style="mso-fareast-language:PT"><o:p> </o:p></span></p><p class="MsoNormal"><span style="mso-fareast-language:PT">Pedro Amaro<o:p></o:p></span></p></div><div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<br><br>
<hr style="border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;">
<table style="border-collapse:collapse;border:none;">
        <tbody><tr>
                <td style="border:none;padding:0px 15px 0px 8px">
                        <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">
                                <img border="0" src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo">
                        </a>
                </td>
                <td>
                        <p style="color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;">
                                Este e-mail foi verificado em termos de vírus pelo software antivírus Avast.
                                <br><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">www.avast.com</a>
                        </p>
                </td>
        </tr>
</tbody></table>
<br>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Qgis-user mailing list</span><br><span><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a></span><br><span>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span><br><span>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span></div></blockquote></body></html>