Lineweight color coding system (like AutoCAD)..?

Another thing in an ongoing project to set Rhino up as a viable alternative to AutoCad:

Would it be possible to add a lineweight colour coding functionality?

I often inherit AutoCad drawings and have to manually work through line colours and lineweights to prepare the drawing for print. Has anyone created an automation for this? Would anyone be able to help create an automation for this?

Rhino 8 and a bit of grasshopper can manage this. Do you have a particular layer standard file you can post? Thanks

1 Like

Many thanks @Japhy. I donā€™t have anything I can share immediately due to NDAs but Iā€™ll see about making up an example dwg I can share to try the workflow you suggest :+1:

Hi Japhy,

Sample/test file attached.

Iā€™ve included one possible line colour to lineweight standard, but of course this varies between files we receive from different consultants, so the ideal solution will enable easy customisation.

Iā€™ve also included a couple of examples of blocks with autocad lineweight colour coding applied and an OS map inserted as a linked block. Iā€™ve included these as editing the line colour of blocks/ linked blocks is one of the complications Iā€™ve found when manually working through line colours and lineweights.

Please donā€™t hesitate to let me know if you need anything else from me.

Many thanks

Hugh

LINE COLOUR TO LINEWEIGHT CODING TEST FILE.3dm (19.4 MB)

Digging into this a bit i have a few questions.

The layers in the block are all color by layer, is the goal to assign the existing layers a particular lineweight? or create new layers that would unify the colors/lineweights, removing the old layers?

The file you sent was in Rhino 7, is that the targeted version?

Hi Japhy,

Many thanks for having a look at this :pray:

I think the best thing is if I prepare a description of the hoped-for behaviour/functionality and purpose of the tool - which others can review and input into also. Iā€™ll try and share this before the end of the week.

Hi @Japhy.

Thanks again for digging into this.

Here is my summary of the purpose of the tool and the desired functionality:

Line colour to Lineweight conversion tool: purpose of the tool and hoped-for functionality

Background:

Lineweight is one of the key aspects of how technical drawings communicate.

As far as I know Autocad has always allowed users to control line weight by line colour, using a ā€œcolour dependant plot style tableā€, also known as a ā€œCTBā€ file. This harks back to the days of hand drafting, where different weight pens would often be colour coded for ease of identification. Colour dependant plot styles arenā€™t the only way to control lineweights in AutoCad, but they have the advantage of allowing the user to immediately ā€˜seeā€™ what lineweight any given line or set of lines is going to print at without consulting the properties panel.

The Purpose of the Tool

In my view facilitating more seamless compatibility between Rhino and AutoCad is key to enabling/encouraging the wider adoption of Rhino in built environment professions. AutoCad, AutoCadLT and other AutoCad family software is still widely used in built environment, and .dwg files remain a common ā€“ often still the default - format for the exchange of drawings between different consultants.

The absence of a ā€œcolour dependant plot styleā€ functionality in Rhino is one of the compatibility issues anyone seeking to replace AutoCad with Rhino, or work between AutoCad and Rhino, is likely to encounter. This is an issue at both the import and export ends of the workflow in Rhino:

When importing an AutoCad file where a CTB standard has been used into Rhino, the lineweight information is effectively lost. In order to gain control of lineweights for printing I will need to (i) manually reassign lineweights to the imported linework, and (ii) change the colours of the linework to avoid printing a drawing with a load of lurid line colours! This can be a relatively time-consuming process.

At the export end of things, when exporting a .dwg from Rhino, there may be the expectation that the .dwg will conform to a CTB standard. This currently necessitates manually (i) stripping lineweights assigned to linework by layer or by object and (ii) (re)assigning line colours to linework, either in Rhino or in AutoCad.

Desired Functionality of the Tool

The tool should enable efficient conversion between line colour and lineweight and, in the other direction, conversion between lineweight and line colour.

The tool needs to allow customisation of the ā€˜plot styleā€™ i.e. customisation of the lineweights assigned to different colours and vice versa.

To answer your specific questions:

The layers in the block are all color by layer, is the goal to assign the existing layers a particular lineweight? or create new layers that would unify the colors/lineweights, removing the old layers?

The goal here is to assign the existing layers a particular lineweight.

As above, blocks present an issue when I manually work through imported dwgs switching line colour to lineweight because I need to enter the block editor in order to edit linework in the block. This isnā€™t too laborious if there are only a few blocks in the dwg, but less fun if there are hundreds or thousands of blocks! So I think itā€™s worth looking for a way to automate this. But if itā€™s a big headache or adds significant complexity, I think that a tool that automates conversion between line colour and lineweight without solving the block issue would still be very useful.

Surely reiterating my summary above, but I realise I wasnā€™t clear in my initial post - the ideal tool will enable conversion between line colour and lineweight in both directions to facilitate both importing dwgs from AutoCad into Rhino and exporting dwgs from Rhino to open in AutoCad.

The file you sent was in Rhino 7, is that the targeted version?

Iā€™m taking a consciously slow approach to moving onto R8. Some good looking new features but Iā€™m letting the dust settle! My relatively uninformed view is that we should be developing tools/solutions that work in both R7 and R8 but youā€™re probably better placed to tell me if this is reasonable.

Hi @hughecchapman,
Rhino does not support the CTB plot configuration files that AutoCAD does.
However, there is a script to and a work around here if you run Rhino for Windows.

And there is a tracking item for this wish here
I will add your additional vote for this feature in the YT.

See a summary of this issue and RVB script option here.
(Note: Rhino Script is only available in Rhino for Windows.)

The new Layer State Manager in Rhino 7 & 8 feature will save configurations print widths so they can be restored quickly on Windows and Mac.

Sincerely,
Mary Ann Fugier

3 Likes