eaolson Posted March 31, 2007 Report Share Posted March 31, 2007 I'm trying to be good and arrange all my VIs appropriately in project libraries*, marking each VI as public or private as I go. But I have found that, when a polymorphic VI is called from outside a project library, LabVIEW uses the access scope (public/private) from the instance VI, not the polymorphic VI. It seems that the scope for the polymorphic VI is simply ignored; you can even call a private polymorphic VI, as long as the instance VI is public. I assume this has something to do with how the actual instances are dropped on the diagram via the polymorphic VI. Is this the intended behavior? It just doesn't seem like the way things should be, at least not in my head. The attached example contains a project library (Case Lib.lvlib) with three VIs: Poly (private) Case DBL (public) Case I32 (private) There is also a Use Case DBL VI that calls Case DBL via Poly and a Use Case I32 VI that calls Case I32 via Poly. Use Case DBL runs fine. Use Case I32 has a broken arrow. Originally, I had made a library with a public polymorphic VI and private instances, because that's what makes intuitive sense to me. Calling the polymorphic VI from another VI didn't work because the instances were private. (Does this nomenclature bug anyone else? A library has always seemed to me to be a actual collection of things, not a separate file containing metadata about a group of things.) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.