How to hide the label of a diagram link in Enterprise Architect using Add-in? - enterprise-architect

In Enterprise Architect, user can hide/show the labels of links (connectors) on a diagram. Concerning extension (add-in) development for EA, is there a function that calling it can set the visibility of a label on the diagram(s)?
Or in another more general word, how is it possible to retrieve the list of the labels of a connector programmatically?

You need to manipulate the diagramLinks.Geometry property. When you have a label this string will contain something like
LMT=CX=6:CY=13:OX=42:OY=9:HDN=0:BLD=0:ITA=0:UND=0:CLR=-1:ALN=0:DIR=0:ROT=0;
LMT is the part for the middle label which contains the name. LMB is for the stereotype and other L-attributes are for roles and cardinality.
Now you need to change HDN=0 to HDN=1 to make the label invisible.

Related

Visio: Creating Automatic Numbered Label

I'm currently working on creating a new stencil for several components I use in Visio and I'm stuck at the point of providing proper labels. If you use a resistor from Visio stencil it automatically generates a label "R1" (for first resistor) and "Rk" for the kth resistor. How can I do something similar for my own stencil ?
1- I need to generate a label "ABCD #" (# number automatically generated based on instance count)
2- How can I position the location of this field?
PS:
1- Visio components have a custom defined field which allows for this (which I don't know how to create)
2- For capacitor for example the shapesheet shows an interesting entry
=SETF(GetRef(User.Label),"""C""&"&ThePage!User.AccumulatorCount)&SETF(GetRef(ThePage!User.AccumulatorCount),ThePage!User.AccumulatorCount+1)
which supposedly is how the count and name are generated (I'm not sure how the AccumulatorCount is defined it differs from element to element).
Thank You!
The EventDrop ShapeSheet cells for various electrical shapes have formulas similar to the one you have discovered:
SETF(GetRef(User.Label),"""C""&"&ThePage!User.AccumulatorCount)&SETF(GetRef(ThePage!User.AccumulatorCount),ThePage!User.AccumulatorCount+1)
The ShapeSheet for the page has a cell: User.AccumulatorCount for capacitors. Other User cells will be added as other shapes are dropped. You can set up your own system by adding a User cell to the page, say: User.Widget. Then you place the "Widget" version of the "SETF" formula into your own shapes.
You can create user cells by:
Open the ShapeSheet for the Page (right-click blank area of page, Show ShapeSheet)
Right-click in ShapeSheet and choose Add Section
Add a User-defined cells section
Find the User-defined cells section and similarly add rows to it via
right-clicking
You change the row names by typing over the red, row-name text on the left.
You enter values and formulas in the cells as you would in Excel.
You can toggle viewing formulas vs. viewing values by pressing F5
while in the ShapeSheet.
You have to make the User cell in the page first, so that your shape can reference it. Once your shape references the page cell, you can drag your shape into a stencil, and it will "drag the page User cell along too". So now, you can drop your Widget shape into a new document, and it will create the page User cell on the fly.
The system is basic and fragile. The count only goes up, and never down. If you have shapes with 1, 2, 3, 4 and you delete 1 and 2, the next shape will still be 5.

How to rearrange or remove contents under #BODY# in oracle apex

So basically I'm new to oracle apex, i have created a blank page in an mobile application in apex and then created a static region having a select list.
Noticed that the select list item is to the right of the screen, i know i can use css to move it to the required spot, but when I did a page inspection, noticed that #BODY# had other divs as well and wanted to know whether the divs or spans under #BODY# can be edited, if so from where and how?
OK then, a Select List item it is.
Select it
in its properties (on the right hand side of the screen), you'll see the Layout section
in there, there are some properties you might find interesting
column - set to "Automatic" by default, and yes - it positions the item "right" on the screen (I don't know why Apex authors decided to do it that way; I'd be happier if it was "left"), somewhere to the 4th of 5th column. What does that column mean? When you run the page, there's the bottom toolbar available to developers. In version 5.x, there's the option (I can't remember its name; most probably it is "Show layout columns") which enables you to show the grid - you'll see vertical "lines" (columns) and see where's each of your items positioned. On Apex 18.1 (available at apex.oracle.com), you'd click "Page info" and select "Show layout columns".
so, if you want to move it left, set the "Column" property to 1 (1st column on the screen)
modifying the "Column" property might require adjusting two additional properties: "Column span" and "Label column span".
I suggest you try to set those properties to different values and see what happens. Apex will inform you if you set something irregular.

Bokeh - How to use box tool without default selections?

I have built a bokeh app that allows users to select windows in data and run python code to find and label (with markers) extreme values within these limits. For ease of interaction, I use the box select tool for the range selection. My problem arises when repeating this process for subsequent cases. After markers are placed for the results, they are rendered invisible by setting alpha to zero and another case needs to be chosen. When the new select box includes previous markers, they become visible based on the selection. How do I override this default behavior? Can markers be made unselectable? or can I add code to the customJS to hide them after they are selected?
Thanks in advance for any help!
There are a few possible approaches. If you just want non-selected glyphs to "disappear" visually, you can set a policy to do that as described here:
http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#selected-and-unselected-glyphs
Basically, for bokeh.plotting, pass
nonselection_fill_alpha=0.0,
nonselection_line_alpha=0.0,
as arguments to your plot.circle call or whatever. Or if you are using the low level bokeh.models interface, something like:
renderer.nonselection_glyph = Circle(fill_alpha=0.0, line_alpha=0.0)
But be aware (I think you already are) that the invisible markers are still there, and still selectable if the user happens to draw a box over them with the selection tool.
If you truly want only a subset of the data to be visible and selectable after a selection, I'd say you want to replace the data in the column data source wholesale with the subset in your selection callback.

Access Form layout and design: Header: How do I make my header section look like Google

I would like to rip off Google's design for my Continuous Form. The detail section of the form is set up to display N number of records resulting from a search, and thus cannot be used to create this effect (i think). Everything must go in the header section.
there are 2 primary issues I would like to address in this question:
Two toned background. The header section should have a grey stripe and a white stripe. This stripe needs to extend the full width of the form, which is variable and will depend on the user. (i'm using tabs not pop-ups)
How to right justify certain elements of the header so that they stay close to the right edge, wherever that may fall, just like your account information on Google.
The "Search Results" in the detail section are loaded by setting the form's recordSource to the results of a query defined in VBA, which takes parameters from the search box. The form is continuous.
Any ideas how to hack this into place?
Recent versions of MS Access provide improved form layout features when using the ACCDB database file format.
The screen captures below are based on a form in Access 2010. The second image is after the form width was expanded, but it's scaled down for display on this web page. However you can open those images directly to compare their relative widths.
The grey color is from the form header's Back Color property. The white box is a simple text box whose Back Color is white and Back Style is Normal (not Transparent).
The text box's Horizontal Anchor property is Both, and its Can Grow property is Yes. The other 3 items ("?", "Button 2", and "Button 3") are command buttons. Their Horizontal Anchors are set to Right and their Can Grow properties are No.
The result of those properties is that when the form expands, those command buttons maintain their size are are kept right-aligned within the form. And the text box stretches to fill the remaining available space.
Note this behavior is accomplished without any VBA code.
I think these layout capabilities were introduced in Access 2007 and perhaps refined in 2010.
For the background, use two rectangles with transparent borders, one back color gray, one white. You can size them to the form by using the form's InsideWidth property. For example:
Private Sub Form_Resize()
rect1.Width = Me.InsideWidth
rect2.Width = Me.InsideWidth
End Sub
I would do a similar thing for the buttons/images/etc you want right justified. Set their Left property relative to the form's width:
mySettingsButton.Left = Me.InsideWidth - 300
Keep in mind all the measurements are twips (1440 twips/inch)

How do I add an action to visio (2003)

In a visio shapesheet one can add actions. I want to create an action that updates the value of another cell (the position of a control). How can one do that. Does it need a separate macro, or can it be specified directly? And how?
You don't need an addon or macro, you can do this in the Shapesheet.
In the Shapesheet look for the Action section. If you don't find it right click and add it. In the Action section add a row. Set the cells to something like:
Action = SETF(GetRef(Controls.Row_1),"2 in.")+SETF(GetRef(Controls.Row_1.Y),"2 in.")
Menu = "Move Control"
Change Row_1 to the name of your control row. You can also change "2 in." to a reference to a cell in which you calculate the new position.
To learn more see:
MSDN: Shortcut Menu Commands
Bill Morein's: Meet A Shapesheet Function: Setf