Skip to main content

How to set the colour of the linetype of text to be 'by layer' in a DWG? I learned from https://knowledge.safe.com/questions/30155/how-to-set-bylayer-color-in-a-gis-to-cad-transform.html that autocad_color = 256 will set the colour by layer, not by entity (which doesn't make sense, but apparently is the answer, and it does work for me). However, this only works for lines and arcs - for text, the text is still coloured 'by entity'. I am transforming a DWG to a different configuration of DWG (seeing layer names, colour, splitting by an input layer, etc) so no major changes. I just can't figure out how to manipulate this particular item

Hi @grahammorris,

Sounds like you are setting these format attributes in the workspace without a template file, is that correct? Did you try using a template file where the stilying is set?

Hope this helps,

Itay


Hi @grahammorris,

Sounds like you are setting these format attributes in the workspace without a template file, is that correct? Did you try using a template file where the stilying is set?

Hope this helps,

Itay

Hi Itay,

Yes, I have a template file. I am not very knowledgeable about DWG's, I asked a colleague who is familiar with Autodesk products and he said this setting isn't done there. Is there something in particular you can point me to look at in the DWG template? I am wondering if template settings are overriding/conflicting with FME transformation attempts


Hi Itay,

Yes, I have a template file. I am not very knowledgeable about DWG's, I asked a colleague who is familiar with Autodesk products and he said this setting isn't done there. Is there something in particular you can point me to look at in the DWG template? I am wondering if template settings are overriding/conflicting with FME transformation attempts

Hi @grahammorris, unfortunatly I dont know much about that either....maybe @daveatsafe or @lenaatsafe will chime in to help.


Hi @grahammorris,

Sounds like you are setting these format attributes in the workspace without a template file, is that correct? Did you try using a template file where the stilying is set?

Hope this helps,

Itay

Ha, aren't we all in the same club! I had FME guy (Nathan) and DWG Guy (Jeff) in separate chat sessions for 2 hours yesterday while I translated between, trying to fix. We fixed a few items, but then got stuck here. It's been a painful process, but I have learned a lot about DWG's. Thanks for adding those staff members, maybe they can help


I believe this problem is solved - my DWG-knowledgeable colleague updated the template file, and this problem is now gone - the linetype of the text is now showing as 'by layer'. I still don' t know why though - I need to compare the different template files. Our speculation is the 'old' template file was old and altered many times over the years. It may have accumulated issues that was overriding the fme transformations. We believe this, because we cannot see in the template anywhere that explicitly defines colours/linetypes to be set 'bylayer' instead of 'by entity'. We believe the 'autocad_colour = 256' is enough to do this, but was being overridden by the old template file. We believe this, because my DWG-knowledgeable colleague built a brand-new FME Template file, that that fixed the issue.


FME_template_firsttry.dwgFME_templateR2.dwg For anyone who wants to keep looking for this - the 'R2' template is the one that worked - new and rebuilt from scratch. The 'firsttry' is the one that didn't work - it's old and has been altered many times. I plan to do a test and compare between the two, and update this topic later. If anyone else wants to compare, they can try

 


Reply