How to judge the type of variable in python?

I need to judge the type of the input variable when I use rhinoscriptsyntax so that I can convert those geometry objects to Guid perversely and avoid some TypeError in the program. But it returns a problem when I just directly use the name of the type like this:

if type(x) == Point3d:
    print('true')

So I want to know how to judge the type of geometry like Point3d, Curve, and also Guid. I think that might hide in another library. I hop that someone can offer some help to me.

The Point3d type is from the Rhino.Geometry namespace:

import Rhino

x = Rhino.Geometry.Point3d(1,2,3)
print type(x)==Rhino.Geometry.Point3d

Thanks!But I also want to know where the Guid type is. It seems not in the geometry namespace.

The Guid type is part of .NET, it is found in the System namespace.

1 Like

It’s a universal unique identifier, often used in for instance game engines to keep track of stuff in the scene and beyond.

1 Like

Thanks!