LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl as dependency

Highlighted

When using the VI Server method "Vi Dependencies" it will not return non-vi dependencies such as XControls, classes (.lvclass, methods ARE reported) and so on.

How then, do we find these dependencies?  Does at least adding the VI in question to an empty project and then getting the dependencies of the target work?

0 Kudos
Message 1 of 14
(1,349 Views)
Highlighted

Yes, if you drill down through the dependencies of  project, XControls will be found.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 2 of 14
(1,311 Views)
Highlighted

As the XControl is part of the front panel, a simple diagram "dependency walking" is not sufficient.

You can grab the front panel reference of the VI, get all controls and check for presence of an XControl instance (IsXControl?).

Using the VI Scripting node "Found Dependencies" on those instances will list the XControl name.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 14
(1,287 Views)
Highlighted

Norbert, which "Found Dependencies" are you referring to?

 

Do you mean fishing through each and every control on the FP, and for those which report they are XControls, then use the "Found Dependencies" on those controls?

 

Just want to make sure I understand.

0 Kudos
Message 4 of 14
(1,280 Views)
Highlighted

You can run that property on any control. I tested this for arrays and a 3D Graph indicator. The 3D Graph results in the expected xctl name while the entries for arrays are empty strings.

But yes, essentially i recommend to call Found Dependencies only for XControls in order to reduce overhead.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 5 of 14
(1,273 Views)
Highlighted

On a side note, if an XControl is a dependency of a given VI, why does it not turn up in the dependencies list of the VI without having to dig deeper?  OR .lvclasses for that matter.... If those would be returned, the whole thing would be a lot simpler.

0 Kudos
Message 6 of 14
(1,261 Views)
Highlighted

Sounds like a feature request. The Get VI Dependencies method includes an exclusion text in its help:

This method does not return non-VI dependencies, such as project libraries, XControls, classes, and statecharts.

 

If you are using class VIs inside the VI, getting the class is rather "easy". However, things get tricky if you do not use methods of a class, but have class elements (e.g. front panel connection) in the VI.


What is the reason for looking into dependencies of a single VI without a project behind it?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 7 of 14
(1,254 Views)
Highlighted

@Intaris wrote:

[...]  Does at least adding the VI in question to an empty project and then getting the dependencies of the target work?


As Paul already mentioned, project dependency walking is possible. You should use recursion to catch all nested dependencies as well if necessary.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 14
(1,249 Views)
Highlighted

You've hit the nail ont he head, classes, libraries and XControls will not be found if methods are not used.

So basically, in order to get the full dependency list, we NEED to interrogare each FP item and EACH BD item in order to find possible classes, XControls and so on......

Ugh, I was hoping the "Get Dependencies" method would spare me all of that.  I can just as well ignore the method entirely and parse myself.

We are working with projects, but I need to know the dependencies of individual items within the project and I wanted to avoid having to put each VI in an empty project in order to get the full list of dependencies (They can't remain in separate projects because we want to do some dynamic re-linking of items.).

0 Kudos
Message 9 of 14
(1,215 Views)
Highlighted

If the information is used for users (human 'readable') only, i think that creating a VI hierarchy view should be sufficient.

You can create it by using Application method "Get VI Hierarchy Image Scaled".

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 10 of 14
(1,210 Views)