Current file location

Hello, i’ve a C# component which gives me a path of the .3dm file. Is there any method to do this with other extensions like .dxf ?

Thank you :slight_smile:

get path.gh (2.4 KB)

This is the opposite but I could add a line or two more: just notify if you want more extensions

FilePath_V1.gh (6.8 KB)

PS: you can add any valid filter you want (case 5, 6, 7 …)

1 Like

Looks intresting thank you :slight_smile:
But it’s not what I exactly wanted.For example,
I open a file in Rhino and the component shows the location of the file even it’s .dxf or .3dm ,
because later i don’t want to browse in Grasshopper.
Is that possible ?
I hope you can understand me :slight_smile:

I’ll add various stuff/options/search whatever soon, In the mean time get this as well

FilePath_V1A.gh (11.2 KB)

I’ve made a little video which shows my problem, I think the solution is way more easier than you think, but I’m not into coding that’s the reason why I don’t know how to solve this

As the video shows when I open .3dm file the component sends the path for the panel, but when I open the .dxf file it does nothing,

I want a component which does this both extensions

Video

Never say never

BTW: Tracing history (string ch_text = Rhino.RhinoApp.CommandHistoryWindowText;):

Thank you for your help :slight_smile: :slight_smile:

This becomes LOL (to the max). See what out has to say (correct things … but is this the point?). BTW: we must read lines starting from bottom-top in order to get the latest loaded thingy … but that’s trivial.

Anyway I’ll try to think (maybe Espresso (lot’s) and/or Vodka (ditto) are required here ASAP) a more “reasonable” way to cut the mustard … because this is 1000% LOL:

Moral: LOL

Disaster: I’m out of espresso, Vodka (and cigars).

Meaning: until proper supplies arrive get the ultra LOL thingy and have(?) fun(?).

FilePath_V1B.gh (10.0 KB)

Moral: Kinda flying from DC to NY via LA.