I am trying the new Custom Curve Display component in GH (R8). When setting the linestyle to DashDot I can see nothing happen in Rhino Canvas. I suppose that it is something related with the scale of the style. My rhino units are set to Meters just in case.
Each time I load the GH file I lose the Line styles. I have to perform some operation in Rhino canvas to make them appear again. Is that a bug? Am I doing something wrong?
In a new file? If so you’ll need to load the linetypes first to populate them in the document before using in grasshopper. This would apply to R7 or 8.
If I open a new grasshopper file, It appears to be empty when I place the query Model Linetypes. In order to see them I need to do some operations in Rhino such as creating a line and changing the linetype manually in rhino. After that, if I place the component I can see all the linetypes
Is there a way to load these components from Grasshopper into Rhino to use them in my script? I want to do some visualization in my script, but when I share it, I lose the linestyles because they are not loaded.
As stated in the thread you linked, Rhino documents do not create the standard default linetypes and/or hatches by default. It was done this way to save the file size of Rhino documents in case you didn’t need to ever use linetypes and/or hatches. To get the standard linetypes and/or hatches to be loaded, you simply need to load one of the Linetypes or Hatches panels, or go to Tools → Options → Linetypes for example. This will then load the default set of linteypes for you and when you go back to your GH definition and hit F5 to recompute your definition, you should then be able to see the full list of linetypes in your parameter.
An alternative to this is to right-click on the Query Linetypes component and choose “Add default linetypes”. This will load the linetypes into the document and then you can use them in your GH definition as needed.
When you select a linetype, it’s selecting a specific linetype from a specific document… which means that if you want to share your Grasshopper definition which is referencing a specific linetype, then you’ll need to also share the Rhino document or else the reference won’t be there. Think of the linetype parameter similar to a circle parameter (or any geometry parameter really). If you reference a circle into your Grasshopper definition and then share that file with someone (but you don’t share the Rhino document)… then when that other user opens the file, the curve parameter will turn orange because it can’t find the reference to the curve you selected in that user’s active Rhino document. The same thing happens here for linetypes. So, you’ll need to share the Rhino document in addition to your Grasshopper definition if you want things to open correctly on another user’s machine.