Colours.4d Definitions and Data Export

Any questions regarding the practice version are asked and answered here.
Post Reply
Darcy Richardson
Posts: 12
Joined: Mon Dec 09, 2019 12:10 pm

Colours.4d Definitions and Data Export

Post by Darcy Richardson »

Hi all,

We are having some issues with colour definitions in 12d (V14), particularly with export to other formats.
For a particular utilities project, we have a set of colours defined in a custom colours.4d file, that we add to all 12d projects. The colours are defined in the .4d by utility name and with an rgb code, eg. colour name "EL" represents Electricity, with the colour rgb(###,###,###).
These colours are applied to all design strings of that type.

The issue we have is that we are required to export these models to 12dxml for submission, and the colour definitions are lost when another consultant opens the files, because they don't have the colours defined. Providing the colours.4d with the files isn't an option due to working with multiple other consultants, who have their own setups files.

I have tried using a step in an export chain that uses a map file to change all of the designs to their rgb colour code, but 12d recognises this as matching the colours.4d named definition, and changes it back to "EL". Is there any simple way around this, or a project/output setting that may help with this?

Kind regards,
Darcy
Owen Thornton
Posts: 5607
Joined: Tue Oct 04, 2005 12:50 pm
Location: Brisbane
Contact:

Re: Colours.4d Definitions and Data Export

Post by Owen Thornton »

The only suggestions I can make are:

1) Coordinate with the other consultants to agree on a common set of custom colours for your colours.4d files,

or

2) Use the SUI colours from the standard colours.4d file installed with 12d Model:
sui_colours.png
sui_colours.png (76.6 KiB) Viewed 11853 times
Rodney Burns
Posts: 55
Joined: Fri Oct 14, 2005 2:31 pm

Re: Colours.4d Definitions and Data Export

Post by Rodney Burns »

Darcy, there are some things the 12d Tech Support staff disagree on, but the colours.4d file is one that doesn't need to be changed (ever).

It's simple, just don't edit it. The problem is you have to much choice. If you were stuck with 256 colours you would make that work. You have 3x that.
------------------------------------------------------------------------------------
With your issue, I would look at the number of colours you have created (used) that aren't standard 12d and build a chain.
Use the "Utilties > A-G > Change" option and using the Filter (select method). Place your data on a view and simple find colour "X" and Change to "Y".

Use the "Option manual" chain command and copy/paste for the number of changes you need.

Then export the data.

Happy to take the support call and talk you through it if you need a hand. EXDS (02) 9453 9449.
Regards,
Rod
Extra Dimension Solutions (www.exds.com.au)
12d Model Technical Support (NSW, ACT and SA) (www.12dwiki.com.au) (www.12dmodeltraining.com.au)
Matthew Monk
Posts: 3175
Joined: Fri Oct 21, 2005 2:46 pm

Re: Colours.4d Definitions and Data Export

Post by Matthew Monk »

It's annoying. I think 12d will match and re-map the colour if the RGB values match a defined colour exactly. I've had some success in the past with adjusting the colours to be off 1 the typical value, e.g. rgb(0, 0, 254). Not a perceptible difference and unlikely someone has "blue" defined exactly as that colour. However, there's still no guarantee that there won't be a defined colour that matches. It would probably be good if the 12da/xml could write and read the RGB exactly as-is without mapping to defined colours.
12dwiki.com.au - Tips, tricks and tutorials for users of 12d Model

12d Synergy Support Portal and Knowledge Base
Owen Thornton
Posts: 5607
Joined: Tue Oct 04, 2005 12:50 pm
Location: Brisbane
Contact:

Re: Colours.4d Definitions and Data Export

Post by Owen Thornton »

I think the colour name of any rgb(rrr,ggg,bbb) colour is changed internally as soon as a match is found in the colours.4d file, i.e. the first colour found in the file, by colour number, with a matching RGB. (If it is not found, the colour name is not changed.) However, the colour number is never changed at the same time. It stays as a negative number (rgb decimal integer minus 2^31). This is a bit of an issue even before going to 12da/12dxml.

Of course, the 12da/12dxml format only stores the colour name, so round tripping the data with this format means that the colour number gets changed as well, even with identical colours.4d files. But the problem isn't with the 12da/12dxml format.

I have suggested the following fix to the programmers: never automatically change the colour name or colour number of any colour specified with an rgb(rrr,ggg,bbb) colour name.
Matthew Monk
Posts: 3175
Joined: Fri Oct 21, 2005 2:46 pm

Re: Colours.4d Definitions and Data Export

Post by Matthew Monk »

Owen Thornton wrote: Tue Jun 07, 2022 4:25 pmI have suggested the following fix to the programmers: never automatically change the colour name or colour number of any colour specified with an rgb(rrr,ggg,bbb) colour name.
Good. That sounds like a much better fix (he says not thinking about the possible far-reaching ramifications of such a change).
12dwiki.com.au - Tips, tricks and tutorials for users of 12d Model

12d Synergy Support Portal and Knowledge Base
Owen Thornton
Posts: 5607
Joined: Tue Oct 04, 2005 12:50 pm
Location: Brisbane
Contact:

Re: Colours.4d Definitions and Data Export

Post by Owen Thornton »

Yeah, I've thought about them and I'm still not sure. :-(
Darcy Richardson
Posts: 12
Joined: Mon Dec 09, 2019 12:10 pm

Re: Colours.4d Definitions and Data Export

Post by Darcy Richardson »

Thanks for the replies everyone, a lot of useful insight here.

On the comment of using the 12d file or the SUI colours, I agree that ideally no one would change the colours.4d file and would use the 12d default. Unfortunately with these bigger projects it's very easy to get caught between various companies, consultants, clients, project groups, etc. who have their own standards and definitions that we as designers don't often have the power to change.
Just a note on the SUI colours, the image that Owen's sent states that it's from AS5488, however looking at the AS5488 2019 issue of the standard page 18 (which we are actually basing our colours on), they appear to suggest different colours to the ones in your screenshot?

[img]https://cardno1-my.sharepoint.com/:i:/g ... Q?e=PnidwI[/img]

The fixes we're aiming to use now are either to have colours for internal use that are different to the export colours, or to change the rgb code on the non-export colours by 1, as suggested by Matthew. Will also look into something similar to Rod's suggestion for the colour change chain, maybe set up a map file for this.
Overall I just wondered if there was something I might have missed in the software settings/output that might have solved the problem, but it seems like we'll have to go for an engineered solution!

Appreciate looking into programming options, also not sure what ramifications that could have.

Thanks everyone.
Owen Thornton
Posts: 5607
Joined: Tue Oct 04, 2005 12:50 pm
Location: Brisbane
Contact:

Re: Colours.4d Definitions and Data Export

Post by Owen Thornton »

The SUI colours do not have official RGBs, AFAIK, and we modified the two very pale ones, so they could be useful on drawings, too. This was in consultation with the IPWEAQ cad committee. See the comments in the file.
Post Reply