Jump to content

Object Class Hierarchy


Recommended Posts

One thing you can try to do to automate this is

  1. Open the LV help.
  2. Go to the property and method reference.
  3. Right click it and choose to print all of it.
  4. This will open a window with all the properties and methods as a long HTML page.
  5. You can right click this window to get the source of the HTML, which you can now save or you can print it to PDF or to Office.
  6. Now you can parse it. For each class, you get the inheritance list at the start.
  7. You can use this info to build a static tree, which you can then use to extract the data.

Not particularly elegant, but it should probably work.

Link to comment

I did this VI more as an experiment in vi scripting than to be "good."

I would recommend creating a static hierarchy and simply returning the section of interest as yair suggested above if you need this to be blisteringly fast.

~Jon

Hi Jon,

unfortunately your code does not work:

It works if the input is not a constant but a true ref.

Ton

post-2399-127614880284.png

Edited by Ton Plomp
Link to comment

The basic problem with both methods is that they're inherently manual. Mine has some advantage in that once you have the parsing code, adding a bunch of new classes is probably easier, but it's limited to what appears in the help.

Jon's method is limited to the classes placed there by the user, but isn't limited to what NI placed in the help. I don't know of any way of getting all the class references automatically, but maybe someone else does.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.