Jump to content

(Conditional) Variables with App Builder


Recommended Posts

Hello!

Is there any way to automatically disable or enable specific LV code when building an application? Maybe with a conditional disable structure, or something like that.

This would come in very handy, for example when using a relative path which changes when running code as an application or in the LV development environment. Or one could hide debug output which is useful in the LV environment, but not in a standalone application.

Any help is greatly appreciated!

Link to comment

You can use any symbols you wish in the conditional disable structure, and you define them at the project level. See examples\general\disable structures\Conditional Disable Structure.lvproj for more info. However, you can't define them for a specific build, unfortunately.

post-11742-1227277280.png?width=400

post-11742-1227277285.png?width=400

(Note an error in the screenshots, they may not work due to case sensitivity, but it gets the point across.)

Combine this with the Application.Kind property and you can usually sort out what you need for target/debugging needs. I share Ton's wish though that the symbols could be defined on a per-build basis.

Link to comment

QUOTE (Ton @ Nov 20 2008, 03:24 PM)

:yes: This is near the top of my on my wishlist, too! Actually, its a very close second to having the ability to designate pre and post-build VIs for each build spec.

However, I'd be very happy in the near term if somebody could explain how to get the progress messages when performing programmatic builds.

Link to comment
  • 5 months later...

Add my vote to the conditional disables being accessed by the build specifications.

Ton - nice work hunting down the conditional disables programmatically. I don't believe any of your VIs access the project level of conditionals, do they? I tried hacking around the the project invokes and properties, but I don't know what value to give to the "Section" in the Project method "Get Item", which I'm guessing accesses it. I can see it clearly in the XML of the project under the same tag "CCSymbols" that you hacked. Any ideas?

If you can access this via VIs then you have all the hooks you need to have a build vi that sets the conditionals and calls the .exe builder you want, or even the full sequence for a complete build. Sweet!

Thanks,

Mike

Link to comment

If you can access this via VIs then you have all the hooks you need to have a build vi that sets the conditionals and calls the .exe builder you want, or even the full sequence for a complete build. Sweet!

You might want to check out this post (message#2)

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
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.