(c++)How to get the current plug-in path

I want to load some file in the plug-in path, but I am new in c++, how cant ia get the current plug-in path?

You can get the full path to your plug-in by calling your plug-in object’s GetPlugInFileName member.

– Dale

1 Like

Thinks @dale I am try it now.

Hi @dale :
Cant you give me some sample?
I try it but I do not kown how to usd it :slight_smile:

The CRhinoPlugIn::GetPlugInFileName() function is a member function, not a static function. Thus, in order to call this member function, you will need to have your one-and-only plug-in object.

For example:

BOOL CTestPlugIn::OnLoadPlugIn()
  ON_wString filename;
  if (GetPlugInFileName(filename))
    // TODO...
  return CRhinoUtilityPlugIn::OnLoadPlugIn();

Hi @dale:
It run good , thinks.