Working in Drawings
Link a drawing to a project, place the project's units in it as blocks, and send changes between the drawing and the project.
A unit is one physical device on the project: a line on a room's equipment list stands for one or more units, so a line with Qty 3 is three units. A linked drawing belongs to one project and has one view, which is the kind of drawing it is: Plan for a floor plan, Ceiling for a reflected ceiling plan, Elevation for wall and rack elevations, or Schematic for line drawings. The view decides which block each unit gets. Placing a unit inserts its block in the drawing and fills the block's text with the unit's values, and AVstackr then records that this drawing shows the unit, a record called a placement. A sync sends the drawing's AVstackr blocks to AVstackr and compares them with the project, and every save of a linked drawing runs one. The palette is the AVstackr window inside AutoCAD, opened by typing AVSTACKR. It follows the drawing you switch to, and its five tabs are Units, Drawings, Review, Blocks and Settings, which The Palette describes.
Your First Block, Start to Finish
Five steps take a symbol of your own from AutoCAD to a placed unit whose tag is filled in. Each step names the tool it happens in, and the section it points to has the detail.
- In AutoCAD, draw the symbol and make it a block with a
DEVICETAGattribute, as Build a Block for AVstackr below describes. - In the palette's Blocks tab, click Upload from drawing… and select the inserted copy, which puts the block in your company's library, as Upload and Replace Blocks below describes.
- On the web, choose the block for the Plan view: for one product in the CAD blocks group of its edit page, or for a whole category on the Device Tags card of Global Config, as the paragraph after the upload steps describes.
- Open the floor plan in AutoCAD, which the palette follows, and in its Units tab type part of the project's name in Project, click Search, pick the project in the list below, and set View to Plan.
- In the Units tab, whose rows show each unit's Tag, Make, Model and Room, select the units with Ctrl or Shift and click Place. On a drawing that is not linked yet, the AVstackr drawing link window opens first, as Link a Drawing below describes. Then each click in the drawing places one block with its
DEVICETAGfilled, as Place Units below describes.
Build a Block for AVstackr
A block is a drawing symbol that AutoCAD treats as one object: a display seen from above, a camera, a speaker. AVstackr places your blocks for you and fills in the text on them, but it can only fill text fields it recognises. This section is how to draw a block so that works. You do it in AutoCAD, before the upload.
- Open a drawing whose units match how you draw. AutoCAD keeps the unit in the
INSUNITSsetting: type it on the command line to see it, and enter a new value to change it. The block keeps that unit, and AVstackr refuses anything other than unitless, inches, feet, millimeters, centimeters or meters. - Draw the symbol at real size, with the geometry you want to see: a rectangle the width of the display, a circle for a ceiling speaker.
- Add the text fields. In AutoCAD these are called attributes, made with the
ATTDEFcommand. Each attribute has a tag, which is its name inside the block, and that name is what AVstackr reads. Leave the attribute's modes at their defaults, and leave its default value blank if you like, because AVstackr writes the value when it places the block. Name the tag exactly one of these and AVstackr fills it every time it places the block:DEVICETAG(the unit's label, such as DISP-003; add this one),MANUFACTURER,MODEL,PARTNUMBER,DESCRIPTION,CATEGORY,LOCATION(the room),SYSTEM,UNIT,QTY,RACKUNITS,HEIGHT,WIDTH,DEPTH,WEIGHT,PROJECT, or the CAD tag of an attribute key. An attribute key is a custom field your company adds to line items on the web, such as Serial Number, on the Line Item Attribute Keys card of Global Config, and each key can be given a CAD tag name, such asSERIAL_NUMBER, that an attribute in the block may use. A tag with any other name is allowed, but stays empty, because AVstackr has no value for it. - Select the geometry and the attributes and run the
BLOCKcommand. Give the block a name, such asDISPLAY-WALL, and pick the base point: the spot that sits under your cursor when you place it. - If one block should serve several views, make it a dynamic block with visibility states. Open it with
BEDIT, add a Visibility parameter from the Block Authoring Palettes, create a state for each view (for exampleTopfor plans andFrontfor elevations), and in each state hide the lines that do not belong. Save and close the Block Editor. On the web you later pick which state each view uses. - Insert one copy of the block into the drawing with
INSERT. The upload reads from a placed copy, not from the block list. Do this in a scratch drawing, or erase the copy after the upload, because a block left in a linked drawing with aDEVICETAGattribute is sent at every sync and comes back under Blocks to link until it is linked or erased.
Now upload it from the palette, as the next section describes. The upload window lists every attribute tag it found and marks each one Supported or Unmapped. If a tag you expected to fill is marked Unmapped, cancel, rename the attribute in the block (the BATTMAN command edits tags), and upload again.
You do not need a block for every view. A view with no block gets a generic box sized from the product's dimensions. Most companies draw a plan symbol first and add elevation faces and schematic symbols only for the devices that need them.
Upload and Replace Blocks
Your company's block library is filled from drawings:
- In the Blocks tab, click Upload from drawing…, or type
AVS_UPLOADBLOCK, and select one block in the drawing. - The Upload block to AVstackr window shows the block name and what the plugin read from the drawing: the block's attribute tags, each marked Supported or Unmapped, its visibility states, and the file's size against the 5 MB limit.
- Set the Name the library shows, 1 to 100 characters. Tick the Views the block suits, of which Plan is ticked to start. Add a Description if you like.
- Click Upload. The command line confirms it, and the block appears in the Blocks tab and on the CAD Blocks card in Global Config.
An uploaded block draws nothing until a product or a category chooses it, which you do on the web. For one product, open Products in the navigation menu, open the menu at the end of the product's row and click Edit. The edit page has a CAD blocks group under Category, with a row for each view, Plan, Ceiling, Elevation and Schematic, and each row lists the blocks that suit that view: pick the block for each view it serves, and a view left at Use category default takes the category's block. Click Save at the end of the form, which saves the blocks with the rest of the product. For every product of a category, open Global Config, under Admin in the navigation menu, and on the Device Tags card find the category's row. Its Blocks column shows one letter per view, in the order Plan, Ceiling, Elevation, Schematic, or a dash for a view with no default. Click the letters to open the same four view rows under the category, pick the block for each view, and click Apply. A product's own block wins over its category's default, and a view with neither draws the generic box. Device Tags describes both pickers.
The uploaded file holds only that block's definition and the drawing's units. A tag is supported when it is a built-in name such as DEVICETAG, or the CAD tag of an attribute key, as Device Tags describes.
To replace a library block's file:
- In the Blocks tab, select the block and click Replace file….
- Select a block of the same name in the drawing.
- The window shows the library block's name and views, which a replace keeps. Click Replace.
Products and categories go on using the block, and blocks already in drawings do not change. When the new file lacks a visibility state that a product or category used, the command line lists each one that went back to the block's default state.
Before it sends anything, the plugin checks the block:
- It refuses a block file over 5 MB.
- It refuses a drawing whose units are not unitless, inches, feet, millimeters, centimeters or meters. AutoCAD keeps a drawing's units in INSUNITS.
- It refuses a replace from a block of another name.
- It refuses an xref.
- It refuses an anonymous block, such as an array.
Uploading needs a sign-in and a role other than Read-only.
Link a Drawing
A linked drawing belongs to one project and has one view. For each unit the drawing shows, AVstackr keeps a placement, which is the record that this drawing draws that unit. The first time you place units in, or sync, a drawing that is not linked, the AVstackr drawing link window opens. Pick the project in the Units tab first, because the drawing is linked to it.
- Check the Drawing name, which starts as the file's name. Type one for a drawing that was never saved.
- Check the View, which starts as the Units tab's view.
- Click Link. AVstackr adds the drawing to the project, and the project's Drawings view lists it. The link is saved inside the DWG, so it is there the next time the file is opened.
When the project already has linked drawings, the window lists them under a heading such as "This project already has 3 linked drawings", one line each with the drawing's name, view, file name and placed units. When one of them may be this same file, for example because this file is a copy made with Save As, the window warns "A drawing that may be this file is already linked: Drawing1, 2027 test plan. Linking again creates a second drawing." Link then adds this file as a second drawing, and Cancel leaves it unlinked.
Drawing link…, or AVS_LINKDRAWING, opens the same window later:
- On a linked drawing it offers Rename and Unlink. Unlinking removes the link from the DWG and leaves the drawing in AVstackr as it is. Remove it there, or from the palette's Drawings tab.
- When the drawing was removed in AVstackr, the top line reads Link removed in AVstackr. The window then offers Relink as a new drawing, whose placements come back at the next sync, or Unlink.
- When the drawing was linked while signed in to another AVstackr server or company, the top line reads Linked to another server / company, and the palette changes nothing in the drawing. Relink it as a new drawing of the Units tab's project, or unlink it.
A drawing's view cannot change once it is linked. To show the same equipment on a reflected ceiling plan, link that drawing with the Ceiling view.
Place Units
Placing a unit draws its block and records its placement in AVstackr. The Units tab lists the units of the project's lines. A line whose units were never created has no rows yet. The footer counts those lines, and Assign tags beside it creates and tags their units, as Assign Device Tags does on the project page.
- In the Units tab, select the units to place: rows with ○, or ◐ for a unit another drawing also shows.
- Click Place, or type
AVS_PLACE. - For each unit, click the insertion point. The block comes in aligned with the current UCS. Rotate it afterwards with ROTATE if you need to, and the next Sync records the new angle. Esc stops placing.
Each block is inserted on the current layer with its attributes filled from the unit. The drawing then syncs, so the unit's row turns ● and the project's Drawings view counts it. A unit this drawing already places shows Already placed here and cannot be placed twice.
Place next places only the first selected unit that this drawing does not place yet. The rest of the selection stays selected, so each click of Place next places the next unit. Use it to place a selection one unit at a time, with other work in between.
On the web, the project page counts the units that are not drawn yet on a view their category expects, in the room's Needs attention tile and under the room's total in the rooms list. A unit's placement on a linked drawing of that view takes it out of the count the next time the project page loads its data. Device Tags explains how a category says which views it expects.
Which Block Is Drawn
- A unit gets its product's block for the view, else its category's default block, else a generic box, as Device Tags describes.
- A library block is downloaded once and kept on this computer. When the drawing already has a block definition of the same name, that definition is used as it is. The plugin never redefines a block, so a drawing keeps its own version after the library file is replaced. To bring in the new geometry, redefine the block with AutoCAD's own tools.
- A library block is scaled from the units it was drawn in to the drawing's units, which AutoCAD keeps in INSUNITS. A drawing without units, or in units AVstackr does not convert, is treated as inches, and the log says so.
- A generic box is a block whose name starts with
AVS_GEN_, sized in the drawing's units from the product's dimensions, with the device tag in its middle. Units of the same size share one definition. - Every attribute the block defines is filled with the unit's AVstackr value, when AVstackr has one, and keeps the block's default otherwise. The unit's link is written into the block's
AVSTACKR_IDattribute, when the block has one, and into data AutoCAD keeps with the block.
Sync and Review
A sync sends AVstackr every AVstackr block in the drawing and settles what it can on its own. It places matched blocks and records moved ones. It copies into AVstackr the values the drawing owns, and the shared values that changed only in the drawing. It rewrites in the drawing the values the project owns, and the shared values that changed only in AVstackr. A shared value that changed on both sides goes to the Review tab as a conflict. Sync, or AVS_SYNC, runs one, and so does every save of a linked drawing. When you open a linked drawing with Live sync on, the palette also syncs it once in the background.
The status line reports the result, such as "Placed 3 · Moved 1 · Pulled 2 · Refreshed 4 · 2 to review". Each count means this:
- Placed counts blocks that AVstackr matched to a unit and now records as that unit's placement on this drawing.
- Moved counts placements whose block changed its position, rotation, scale, layer or visibility state, or its handle. AVstackr recorded the change.
- Pulled counts values that the drawing owns or shares, that changed in the drawing, and that were copied into AVstackr. Each value counts once.
- Refreshed counts blocks that the plugin rewrote with AVstackr's values. A rewritten value is one the project owns, or a shared value that changed only in AVstackr.
- To review counts the entries the Review tab now lists.
How blocks are matched to units, and which side owns which value, is set out in Device Tags.
What needs a decision goes to the Review tab, grouped by kind. Each entry names the block's device tag and handle. A conflict also shows the drawing's value and AVstackr's.
| Group | The answers |
|---|---|
| Conflicts | Keep the drawing's value, or keep the project's value |
| Copied blocks | Add a unit to the line, keep as a graphic only, or ignore for now |
| Blocks to link | Link to an existing unit, add a unit to the line, add a new line, keep as a graphic only, or ignore for now |
| Missing blocks | Unplace the unit, or keep the placement |
Keep as a graphic only removes the block's link to AVstackr, as the Unplace section of this page describes. A block that still has a DEVICETAG or AVSTACKR_ID attribute is sent at every sync. While its DEVICETAG holds the tag of a unit not yet on the drawing, the next sync links the block to that unit again. Otherwise it comes back under Blocks to link each time, where Ignore for now leaves it until the next sync.
Keep the placement changes nothing. AVstackr still records the unit as drawn here, so the next sync lists the missing block again for as long as it is missing.
- Choose one answer for each entry you want to settle now. An answer that is not allowed, such as adding equipment to a contracted version, is greyed out with its reason.
- Some answers need a choice: Unit for linking to an existing unit, Line for adding a unit to the line, and Product and Room for adding a new line. Until they are chosen, the entry says "Pick the entries this answer needs."
- Click Apply. Entries you left unanswered stay for the next sync. An answer AVstackr could no longer carry out is listed under Skipped with its reason.
When the project changed while you reviewed, the palette syncs again and says "The plan changed while you reviewed it, so the drawing was synced again." Answer the new entries, then apply again.
Live Edits
While Live sync is on, which it is by default, your changes to placed blocks reach AVstackr about a second after the command that made them ends, without a sync:
- An edited attribute value is sent on its own. When the drawing owns the value, AVstackr saves it on the unit. When AVstackr owns it, the plugin puts AVstackr's value back in the block and says so on the command line, for example "DISP-003 MANUFACTURER is set in AVstackr; restored".
- A block that is moved, rotated, scaled, put on another layer or switched to another visibility state has the change recorded.
Erased blocks wait for the next sync or save, which lists them under Missing blocks, and so do copied and hand-drawn blocks. An edit that could not be sent, for example because the network was down, is reported on the command line. The next sync sends it. With Live sync off, your edits reach AVstackr at the next sync or save.
Update from AVstackr
When a placed unit changes in AVstackr, its Changed column shows ●. Update from AVstackr, or AVS_UPDATE, syncs those blocks so they show AVstackr's values, by the same ownership rules as a sync. A value the drawing owns is not overwritten. The palette also updates when you switch to the drawing, and at the Refresh every period while it is open.
Link Existing Blocks
Blocks that were in the drawing before the plugin, or that someone inserted by hand, can be linked to units. Only blocks in model space count. Blocks inside other blocks, in xrefs and in paper space are left alone.
- A block with a
DEVICETAGattribute holding the tag of a unit not yet on the drawing is linked to that unit by the next sync, on its own. - For any other block, type
AVS_LINKand select the blocks. The plugin syncs, and the Review tab lists each one under Blocks to link with the units it could be. Pick one, or add a unit or a line for it, keep it as a graphic only, or ignore it for now. - A copied block carries the original's link, so the next sync lists it under Copied blocks. Add a unit to the line for it, keep it as a graphic only, or ignore it.
Unplace
Unplacing takes a unit off the drawing and keeps its block as a plain graphic.
- In the Units tab, select the unit's row and click Unplace here. Or type
AVS_UNPLACEand select its block. - The plugin first removes the block's link: the data it keeps with the block and the value of its
AVSTACKR_IDattribute. - The plugin then removes the placement from AVstackr. The block stays in the drawing, and the unit stays in the project.
Unplace keeps the block's DEVICETAG value, and every sync sends a block that has a DEVICETAG or AVSTACKR_ID attribute, even an empty one. While the DEVICETAG holds the unit's tag, the next sync links the block to that unit again. Otherwise the block comes back under Blocks to link. To take a unit off the drawing for good, erase its block and answer Unplace the unit.
Other Drawings of the Project
The palette's Drawings tab, which The Palette describes, lists every linked drawing of the Units tab's project. Select a drawing there, and for Unplace… one of its placements, then click a button above the grids:
- Open opens the drawing's file in AutoCAD, and the palette follows it.
- Rename… opens the AVstackr drawing link window, which says "Rename the drawing Drawing1 in AVstackr. The file is not renamed." Type the new name and click Rename. The status line then says "Renamed Drawing1 to Level 3 plan."
- Remove link… asks "Remove the drawing link and 9 placements? Units are not deleted." After Yes, AVstackr removes the drawing and its placements, and the status line says "Removed Drawing1 and 9 placements. The units stay in the project." The units keep their tags and attributes. When the removed drawing is the open one, the DWG forgets its link too. The top line then reads This drawing is not linked to AVstackr, and the next place or sync offers to link it as a new drawing.
- Unplace… removes the selected placement after a question: on the open drawing it asks "Unplace MNT-001 from Drawing1? The unit stays in the project.", and on any other drawing it asks "Unplace MNT-001 from Drawing1? The unit stays in the project. The next sync of that drawing places it again unless its block is erased." The question names the unit by its device tag, or by its make, model and number when it has no tag. After Yes, the status line says "Unplaced MNT-001 from Drawing1. The unit stays in the project.", and the Units tab's Drawn column follows.
On a drawing that is not open, the block keeps the unit's link, so that drawing's next sync places the unit again. To take the unit off that drawing for good, erase the block in that drawing. On the open drawing, the block's link is removed, as Unplace here removes it. A later sync links the block again only while its DEVICETAG still holds the unit's tag, as the Unplace section of this page describes.
Rename…, Remove link… and Unplace… need a sign-in and a role other than Read-only. While the palette is read-only they are off, and the notice below the top line says why. The palette turns read-only the first time AVstackr refuses a change, as Troubleshooting describes. When someone else removed the drawing or the placement first, the status line says so and the tab reloads, as Troubleshooting describes.
