Clear data inside component

Is there a way to clear data inside a gh component? (not by Metahopper component)
Thank you

Because u knew about Metahopper, i think u dont wanna hear (right click → Clear Values) ?

Thank you, but I was thinking of something different…

I searched with ChatGPT for a “ghpython” way, to get ID of a Component in the Canvas, but for this u need a API connection. I hoped to get the ID of a specific Component and then create another code to say Clear it by pressing a button at ghpython script.

I think u must use Plugins.

Python: I hoped to put “curve” into “x” from ghpython to get its ID. but No.
import rhinoscriptsyntax as rs

curve_id = x[0].InstanceGuid if x else None

a = curve_id