Technologies > User Interface Add-Ins> Flash Drawing Views > Assign Room Standards to Rooms
Note: With the release of ARCHIBUS V.23.2, all ARCHIBUS views were converted to use the HTML drawing control instead of the Flash drawing control. If you have previously created views that use the Flash drawing control, the view's drawings will still work.
For new views that you create, ARCHIBUS, Inc. recommends using the HTML control, as the Flash control is slated for desupport in future versions of ARCHIBUS. For information on converting existing views with Flash drawings to HTML format, see Convert views with the Flash drawing control to the HTML drawing control.
In this example, the user selects a room standard from the room standards grid and assigns this value to a room or rooms selected in the drawing.
Note that in the drawing panel the assignMode
attribute is set to 2
(One to Many), which will allow the user to select a room standard from the selection grid and then assign the value to multiple rooms. A selectionMode
of 2
allows the user to select any asset in the drawing, while a selectionMode
of 1
would allow only selection of highlighted assets:
<panel type="drawing" id="assignRoomStandardsDrawing_cadPanel" layoutRegion="dwgPosition"
highlightDataSource="assignRoomStandardsDrawing_highlightDs"
selectionMode="2"
assignMode="2"
...
>
In the grid onclick
event handler, obtain the room standard value from the selected row. The setToAssign()
method instructs the drawing control to apply the color for the specified field and value when an asset is subsequently selected in the drawing:
function onAvailableGridSelected(row) {
var cadPanel = View.panels.get('assignRoomStandardsDrawing_cadPanel');
cadPanel.setToAssign("rmstd.rm_std", row['rmstd.rm_std']);
}
The selected room record can then be retrieved and saved by assigning an onclick event to the drawing control:
Other related topics:
Flash Drawing ControlFlash Drawing Control
View: http://localhost:8080/archibus/schema/ab-products/solutions/drawing-flash/ab-assign-roomstandards-drawing.axvw
Copyright © 1984-2018, ARCHIBUS, Inc. All rights reserved. |