When I create custom modules I like to use a separate directory that is not in the DSPC folder. With version 6.18, I am getting an error because it cannot find the classid file. After doing a bit of digging I find that line 87 of awe_generate_module is calling classid_lookup. M.classID=classid_lookup(M.className); This call does not pass DIR so the test fails and an error is generated. Looking at the header file for classid_lookup it states that if DIR is empty then AWE_INFO.buildControl.modulePath is used. Since my classids file is not in the paths in AWE_INFO.buildControl.modulePath I wrote the code below to place it there without duplicating my path on subsequent calls to make_myModules.
hit=0;
for i=1:length(AWE_INFO.buildControl.modulePath)
hit=hit+strcmp(DIR,AWE_INFO.buildControl.modulePath{i});
end
if hit == 0
AWE_INFO.buildControl.modulePath{end+1}=DIR;
end
Now when I run my make file I get the following error:
Operands to the || and && operators must be convertible to logical scalar values.
Error in classid_lookup
Error in classid_lookup
Error in awe_generate_module (line 87)
M.classID=classid_lookup(M.className);Error in awe_generate_library
Error in make_myModules (line 83)
awe_generate_library(MM, DIR, NAME, USESLIB, GENDOC);
My questions are:
- Is this the best way to communicate my folder path to classid_lookup? It seems a bit dangerous modifying a global variable.
- why am I getting the error from inside classid_lookup?
4:16pm
Hey Darrel,
You can set the module search path under File->Set Module Path -> Add Folder. This is the normal way to add custom module directories to the search path, and it should solve your problem with the error in classid_lookup.
If this doesn't fix your issue, let me know and I can try to reproduce.
-Axel
1:05pm
Thanks, it did solve the path problem. I still get the same error in classid_lookup.
1:36pm
Are there a special characters or spaces in your custom module path?
Does this same custom module work correctly with 6.17.06?
2:03pm
Axel,
Not all csv files are created equal. If you take a csv file that was created in Matlab and open it in Excel and then save it, bad things happen. Extra commas are placed at the end of the lines. classid_lookup gets lost in the parsing of the file.
Thanks for your help. My make file runs to completion.
6:24pm
Wow, good catch. Thanks for posting the solution.