06-24-2024 10:46 AM
Hello all,
I am having an very interesting issue with an Interface and creating an (AF) scripted message for it.
As part of our codebase, I would like to separate Interfaces as their own individual components, with individual projects and build outputs. I would like to distribute the Interfaces as PPLs. However, when I build an interface inside a PPL and include that in another project, I seem to get an error when I create a message for the Dynamic Dispatch VI inside that PPL.
When I look at the Message Maker VI that originates the error, this is what I see:
Apparently, the error comes from a path length: that much I could accept, but that PPL and the rest of the project are at a very shallow level: However, it was indeed built at the ProjectTemplates location shown there. My question is, how does the PPL somehow "remember" where it was built; How does it record that path, and why.
This leads me to a very interesting point of the discussion for me, albeit a bit tangent to the original problem: How do you distribute your interfaces for use in other components? Do you place them inside a top level library? Do you include the scripted message for that Interface method along with it?
I only tried this in LV2024 so far, full disclosure.
Many cheers+
Cris
06-24-2024 02:01 PM
Small update: It seems that when a PPL is built based on a Library that exists inside the ProjectTemplates folder - even if the build folder is placed into a different folder (say, c:\junk), it still has recorded the original folder in ProjectTemplates upon the message creation dialog, as per the second image. Huh.
Here's hoping anyone can pitch in on this, also contributing how to best ship/distribute Interfaces throughout projects
06-25-2024 02:51 AM
Seems there is an issue with the Message Maker when creating a message for a method inside a PPL: as we can see in the path, the create directory recursive.vi has a non valid path with the .lvlibp extension on it. I'm not sure this is a bug that it does not strip it, or that somehow by design and you should not be creating these messages from PPL methods...
Hope someone can shine a light on this,
Thanks as always,
01-28-2025 08:20 AM - edited 01-28-2025 04:56 PM
@crandiba wrote:
Seems there is an issue with the Message Maker when creating a message for a method inside a PPL: as we can see in the path, the create directory recursive.vi has a non valid path with the .lvlibp extension on it. I'm not sure this is a bug that it does not strip it, or that somehow by design and you should not be creating these messages from PPL methods...
Hope someone can shine a light on this,
Thanks as always,
EDIT: ok, just realized I replied to a 6mo+ old post. Oops
I'm not sure I quite understand the issue you are having. Are you saying you created a PPL of a library that only contains an interface and that interface's dynamic dispatch VIs and then importing this built PPL into a different project and attempting to generate the message classes for those interface VIs?
If my understanding of what you are doing is correct, I think trying to use the message maker on VIs that are already compiled in a PPL is likely a problem. I have never tried that before and I can't test it for you, but my first instinct is that what you describe won't work because it causes problems with the message maker (where will it place the messages? It can't write them inside the PPL) and while that may be possible to fix by altering the scripting it may be impossible for other reasons (eg. does message maker need access to BD info of the VIs?).
The way I have always dealt with interface PPLs, and the way I assumed everyone else did, was create the messages for the interface during interface development, THEN build the PPL which includes the message classes.