Assign value to property node - labview

I starting using LabVIEW about 1 week ago. In a tutorial I watched this picture
I am wondering how can I assign the value "Disabled and Grayed out" to disabled property value of the button?

There are a couple of ways to create property nodes in LabVIEW. This method is the quickest and easiest and matches your picture.
Add the button to your front panel.
Right-Click and go to Create >> Property Node >> Disabled in the menus. Click on this.
LabVIEW will automatically switch to the block diagram and let you drop the property node.
By default it is a read node. Right-Click on the block where it says "Disabled" and select Change To Write in the menu (There is also Change All To Write if you have multiple properties.
Hover over the input so you get the wiring symbol. Right-Click and select Create Constant to create the correct Enum constant to write to it.
That is the basics and the way most people start out - a couple of extra tips:
The node is expandable hover at the bottom and you get the resize block, drag this down and you can set more than one property on the same node. These are set in order from top to bottom.
Left click on each property to change which property it is.
Right-Click and go to Link To... in the menu to change which button it applies to.

Related

MagicDraw simplified view

I have used MagicDraw v18.5 to draw a class diagram. My diagram has classes, attributes, stereotypes, and notes.
My business users find my diagram too technical. I would like a way to give them a dumbed-down, business-friendly view that shows only classes and associations, without the attributes or stereotypes.
I tried the one thing I know: select everything in the diagram, edit the compartments, and hide the attributes and stereotypes. But the result looks terrible: the content of the compartments disappears as intended, but the compartments aren't resized. Each class is a box with a big empty Attributes compartment. I could never show this to a business user without manually resizing.
Is there a more straightforward way to do this?
Note this is using MagicDraw 19.0-SP2, so there might be some differences.
I'll use block elements as an example, instead of classes, but they are just "fancy" SysML classes. Your symbols probably look something like this as described:
with my empty compartments being "values" and "operations", instead of "attributes" and "stereotypes". The principle is the same for any compartment.
Suppress/Hide the compartments, rather than remove the properties from them.
Per the comments, it appears you have removed the elements from the compartments, rather than hiding/removing the compartments themselves. If you click on the class element symbol, on the left there should be small minus signs that you can click to "Suppress", or hide, each compartment completely.
Alternatively, you can click the "..." Compartments icon on the left at the top (to the left of the symbol name/header) and then remove the checkmark for any compartment you want to hide.
There is also an entry on the Compartments menu to "Suppress All" which will turn all of them off.
After suppressing the compartments, click the auto-size icon at the bottom right and you should get something with just the name:
Bulk Edit multiple symbols at once
You can select all the class symbols at once, and edit them in bulk, rather than following the above for each symbol on your diagram.
To do this, click on a class symbol, then use ctrl-shift-s to select all other symbols of the same type. If you click on multiple types of objects (e.g. hold shift and select both a class and a comment symbol at the same time), then it will select all of the symbols that match the type any of the elements already selected.
Now you can right-click and select symbol properties and will have access to the common properties of all those symbol types at once. Doing it this way will avoid snagging all element types, such as labels and relationships, which often do not have the same symbol properties, and therefore cannot be bulk edited together.
Alternatively, you can open or select the Properties window, then select the "Symbol" tab, to have access to the same properties for bulk edit. The other tabs in the Properties window provide a power means of editing element, tag, and traceability properties in bulk:
In either window, starting typing "Suppress" in the search bar, and you will get all the options for suppressing things from being visible on your selected elements. In the case of a SysML block, which can be True (checked), False (unchecked), or a black box with <undefined>, which will happen if some symbols are currently set True while others are False.
Setting the "Suppress Operations" and "Suppress Values" in my case are the two items I need to hide those compartments on my test Block symbol.
Bulk Autosize
After hiding the compartments, you can click on the auto-resize button in the bottom right, but I recommend going into the awful keyboard shortcut editor and struggling with it until you have setup a shortcut key for auto-size. Then you can hit ctrl-a to select all symbols at once, or ctrl-shift-s for all elements of a specific type, and use the shortcut key to autosize all of them at once.
They have updated it recently to make it not-quite-so-awful, so it's different than 18.5, so I'll leave the steps as an exercise for the reader. I use this shortcut all the time.
Apply word wrap if needed.
You can use the 'word wrap' symbol attribute to allow you to resize to a smaller size and have long names wrap into multiple rows, allowing you to make a symbol thinner.
Note: Word wrap only shows up under the "All" view, not even under "Expert" in Symbol Properties.
Switch from "Standard" or "Expert" to "All" in the view dropdown on the upper right of the symbol properties window.
Type "wr" in the search to find the "Wrap Words" property, and set it to true.
Now you can resize your symbol to a thinner version with a name or other properties that wrap onto multiple rows. Why they don't have this property set by default is beyond me...
Unfortunately, you will need to resize elements manually to get them to actually wrap the words, but once you have the width the way you want, auto-size will work fine.
You can also make everything really skinny, then use the "Layout -> Make same width" command to make all elements the same width as the widest selected symbol, if you want uniformity.

Changing text with Labview Toggle switch?

I'm new to Labview and was wondering if the following was possible:
Can you switch the same text box using a toggle switch? I have tinkered around and figured that I need the selector when displaying output but can't seem to get anywhere.
ex. When toggle switch is true = show a text on front panel that says on
When toggle switch is false = change the SAME text to off.
While I reckon there is more to your question, without any constraints, this is this the easiest way: use a string indicator and give it a new value when the toggle switch changes position.
Example
VI Snippet
The previous answer is good, but to be more precise consider using select instead of case structure. The select works lighter in LabVIEW.
In situations when you just have to pass this or that data (your case), not perform code (ex: Popup something in true case and enable a counter in false case) you should consider using selector, as in case structure you create additional tunnel, which can be avoided using Select.
If you just want some text next to the switch that changes to show the state of the switch, you can do this without any code:
Right-click on the toggle switch and choose Show > Boolean Text.
You should now see the word ON or OFF in the middle of the switch.
Right-click on it again and choose Advanced > Customize….
LabVIEW will now open the control editor window. The first button in this window's toolbar looks like a spanner (wrench); click it and it should change to a pair of tweezers.
Select the ON or OFF text and move it to where you would like it to be, relative to the switch itself.
Close the control editor window. You can save the control as a separate file if you want to reuse it elsewhere, but if you don't it will still be saved as part of your VI.
You can edit the Boolean Text on your VI's front panel in the normal way. Note that clicking on the boolean text when the VI is running will operate the switch - you may or may not want that to happen. You could get round this by placing a transparent decoration box on top of the text.
All Boolean controls (I think) have a Boolean Text property, but not all of them have it visible by default.

How to edit Expression Blend selected control part?

I am trying to edit a specific control part within a custom TabItem Template. In this case, it's the TemplateBottomSelected control part.
I'm having an issue where I cannot seem to view or edit any control parts within the template editor except the default TemplateTopSelected. Here's a screenshot of what I'm talking about:
Even though I'm selecting the "TemplateBottomSelected" grid, the only thing I can see is the template for the TemplateTopSelected item.
How the heck do I edit the other control parts within the template using the editor?
Thanks!
that's because these templates are either collapsed or the opacity of them is set to 0. :)
you can use the eye toggle button to only show the one you want to modify at design time, set the visibility to visible, do your changes, and reset it to collapsed.
please let me know if you need more info.

Is it possible to make a statusbar like notepad in VB?

I made a notepad using vb 2008 and I am facing a problem who I'd make the Statusbar.
any idea will be great.
Note: I am using the Textbox to read and write text
Thank you
You need to add a StatusStrip control to your form.
To find it, open the Toolbox, expand the "Menus & Toolbars" section, and double-click on the one named "StatusStrip".
Double-clicking on the control in the Toolbox will automatically add it to your form, and dock it along the bottom, just like it is in Notepad.
Once the control is there, you can customize it by changing properties in the Properties window. If you want to add information to the status bar, you do that by adding sub-controls inside of it. Click the drop-down arrow next to the "new" icon, and you'll see a list of possible choices:
"StatusLabel" — displays static text
"ProgressBar" — displays a progress bar, indicating the progress of a background operation
"DropDownButton" — displays a drop-down button, to allow a choice of multiple options
"SplitButton" — displays a drop-down button that allows a choice of multiple options, but also invokes the default option by a single click on the button.

2 column table presentaion control, like the properties window in the dev environment

in a windows form if i want to duplicate the properties window layout on my form, which is basically a 2 column table with title on the left and value on the right, what control do i use to achieve that?
A DataGridView component can be used to achieve a similar visual style and functionality, though it is not exactly the same.
To add columns, click the Smart Tag and change the settings, click "edit columns", and you know the rest.
If you want the exact same functionality as the properties window, and let your users edit the properties of an object, you can use the Properties control.