Not found in current @folder
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am trying to use a third-party package (gdsii toolbox) and I have added everything required to the path for using this toolbox. However, there is a certain subset of functions contained in three folders: @gds_structure, @gds_library, and @gds_element in one of the subdirectories (which is included in the path). When I try to call any of these functions, I get the following error:
'add_ref' is not found in the current folder or on the MATLAB path, but exists in:
/Users/jordan.e/Google Drive/GTD/PhD/Carbon Fiber
Array/Masks/gdsii-toolbox-141/Basic/@gds_structure
Change the MATLAB current folder or add its folder to the MATLAB path.
Fine, that's alright. However, when I try to add this folder to the path
Warning: Method directories not allowed in MATLAB path: /Users/jordan.e/Google Drive/GTD/PhD/Carbon
Fiber Array/Masks/gdsii-toolbox-141/Basic/@gds_structure
> In path (line 109)
In addpath (line 96)
In setpaths (line 14)
Seems like a catch-22. MATLAB knows the function is in a certain folder, and wants that folder added to the path in order to call that function, but that folder cannot be added to the path. What should I do?
2 comentarios
Simon
el 25 de Mzo. de 2020
Did you find a solution? I have a similar problem. I suspect some kin of permissions Issue. I just received a new Win10 x64 from my IT department and I have this problem since then...
Respuestas (1)
Steven Lord
el 25 de Feb. de 2019
From the messages you posted add_ref is a method of the gds_structure class rather than a plain old function. That imposes some additional requirements on calling that function.
If it's a Static method you need to call it using the name of the class that defines it (or you can call it with an instance of that class if the method is defined to accept an instance.) That would look like:
gds_structure.add_ref(necessary_input_arguments_to_call)
If it's not a Static method, you need to call it with an instance of that class as at least one of the inputs. See for example this documentation page. Usually the first input argument is an instance of the class.
instance = gds_structure(necessary_input_arguments_to_construct)
add_ref(instance, additional_input_arguments_to_call) % or
instance.add_ref(additional_input_arguments_to_call)
Depending on the specific nature of the add_ref method and the gds_structure class, you may need to specify one or more output arguments.
0 comentarios
Ver también
Categorías
Más información sobre Search Path en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!