When using import 3dm how to I get the line type information? “Object details” doesnt seem to include this information.
Hi,
you could plug a Param→Line in between and it spits out lines otherwise null.
Unfortunate the component creates a error message and complaining about wrong data type but it works.
Or you could use a script component and use GetType() and compare it with Rhino.Geometry.Line or Rhino.Geometry.LineCurve
Here is a small python script to get Line type Curve, i was curious about the DataTree creation without the treehelper function. You could add another imput to compare it to different types.
import Rhino as rh
import Grasshopper.Kernel.Data as ghd
from Grasshopper import DataTree
LineType = DataTree[object]()
for i in range(Geo.BranchCount):
for j in Geo.Branch(i):
if j.GetType() == rh.Geometry.LineCurve:
LineType.Add(True,Geo.Path(i))
elif j.GetType() == rh.Geometry.Line:
LineType.Add(True,Geo.Path(i))
else:
LineType.Add(False,Geo.Path(i))
Hi Edgar -
You didn’t mention which version of Rhino you are using…
… and it looks like the term “line type” might be ambiguous.
If you are after the “linetype” property of a curve:
The old Import 3DM parameter only imports geometry from a file, not its attributes.
In Rhino 8 and later, you can use the Import Content component to import objects that include both the geometry and its attributes. From there, you can find the linetype properties of objects.
-wim
Sorry about that. Rhino 7.
The following setup allows for all my linework attributes to be imported however I can’t seem to get the linetype (dashed, solid, etc..) to also get transferred.
Hi Edgar -
That “Define Object Attributes” component appears to be from a plug-in?
If you either post your .gh file and/or name the plug-in perhaps others that are familiar with that can help you out…
-wim
It’s from Elefront.
It looks like you’re using the “Legacy” version of eleFront, which really only dealt with Linetypes through layers. Meaning, it didn’t allow for seeing/changing Linetypes on a per-object basis.
The new version (v5) we released for Rhino 7 and later does have this feature. (A) shows you the per-object setting (null means that it is using the linetype from it’s layer), and (B) is how you can get the Linetype of the Layer itself.
If you have a lot of eleFront in your scripts, then you may want to read this before you upgrade:
https://elefront.via.inc/docs/eleFront%20Primer/Notes%20for%20Existing%20Users
But you can also have the Legacy version and current version installed side-by-side and migrate as you go.



