Quantcast
Channel: Visio General Questions and Answers for IT Professionals forum
Viewing all articles
Browse latest Browse all 2333

Managing Component Explorer in the Process Engineering add-in

$
0
0

I apologize in advance for the long post, but this is a complicated subject that requires detailed explanation.  Thank you in advance for taking the time to read it.

 

I am having trouble understanding the Process Engineering add-in for Visio (2010 and 2013).  Here are the steps to duplicate this misbehavior:

  1. Start a new drawing based on the PFD or P&ID template.  (I can find no differences between the two.)
  2. Drag a shape from the Instrument stencil onto the drawing (e.g. the “Indicator 2” bubble).
  3. Press F2 to edit the bottom portion of the bubble text and enter "1150" as the Loop Number.
  4. Open the Shape Data window and enter "FT" in the Instrument Type field.  This will display in the upper half of the bubble. (It’s a separate textbox within the grouped shape.)
  5. On the Process Engineering tab of the ribbon, check the Component Explorer box, then expand the Instrument hierarchy fully.
  6. Drag another Instrument (PLC or CRT) onto the drawing.
  7. Press F2 on that instrument and enter the same "1150" Loop Number.  (Note in the Component Explorer window that the 2nd shape is automatically moved under the same component as the 1st shape.)
  8. Open the Shape Data window for the second shape and enter "FIC" in the Instrument Type field.
  9. The first shape’s Instrument Type is changed to match what you just entered for the second shape!

Having two instrument shapes on a drawing share the same tag/loop number is not uncommon – in fact, it follows the ANSI/ISA-5.1-2009 Standard (https://www.isa.org/store/products/product-detail/?productId=116630)– but it appears the shapes that come pre-built in the Process Engineering add-in aren’t designed with that in mind.  I’m open to the possibility that I may be doing something wrong and/or just don’t understand how they are supposed to work, so if someone please can educate me on the steps needed to populate four shapes with different tag prefixes and the same loop number on the P&ID template, I’d love to learn how.

I’m also curious how the Component Explorer actually works.  The only post I can find that even comes close to touching on this subject is Deleting Shape Data (Custom Properties) by Aaron Rykhus, MSFT, a Microsoft employee (http://social.msdn.microsoft.com/Forums/office/en-US/be2a21ef-d064-41c1-9743-92957ddcc873/deleting-shape-data-custom-properties?referrer=http://social.msdn.microsoft.com/Forums/office/en-US/be2a21ef-d064-41c1-9743-92957ddcc873/deleting-shape-data-custom-properties?referrer=http://social.msdn.microsoft.com/Forums/office/en-US/be2a21ef-d064-41c1-9743-92957ddcc873/deleting-shape-data-custom-properties?forum=visiogeneral):

The 'Process Flow Diagram' template has automation that binds Shape Data to the Component and not to individual shapes. So if multiple shapes are members of the same component in Component Explorer they'll have the same Shape Data, it's mirrored.

When I look at the Document, Page, and other ShapeSheets, I cannot find any section or row that is dedicated to a “Component” object.  I cannot find any Page or Shape properties via VBA that reference a Component object.  If I rename the Visio 2013 file to a ZIP extension and examine all the XML files, I also cannot find any dedicated Component objects.  I have even installed the Visio 2013 SDK (http://www.microsoft.com/en-us/download/details.aspx?id=36825) and ran the Event Monitor while performing the steps above and cannot find any events or fields being modified related to a “Component” object.  This is very confusing.  What it appears to me the PESolution (Process Engineering) add-in does to create the Component Explorer hierarchy is some matching of certain Shape data and ShapeSheet values from all the shapes on a page to create theappearance of a Component object.  For example, here is a sample layout for the Component Explorer window:

+ [Drawing Name.vsdx]

  - Equipment

    - P-100 Loadout Pump

      [icon] Positive Displacement

  - Instrument

    - I-1

      [icon] Indicator 2

    - I-2

      [icon] PLC

 

The first line is the Visio file name.

The first level is theUser.ShapeClass value from the ShapeSheet.  Unique values fromall shapes on the page are included – in some cases, even a <None> class.

The next levelappears to be the User.PEComponentTag value, but after significant testing, I have found this is actually the.Text property of the Shape (or .Characters.Text).

  -This, I believe, is the heart of the problem explained at the top of this post.  Because the text field is editable for the shapes in the PE stencils, it isimpossible to have to shapes with the same ShapeClass value share the same Loop Number – because the layout of the shapes uses the .Text property to display that number. So if I need to show an LT, LV, and LIC all with the same Loop Number, I can’t use the default shapes... because they all have “Instrument” as their User.ShapeClass value.  Was it Microsoft's intent that these shapes be used as a basis only, and end-users modify the ShapeClass field from "Instrument" to "LT", another for "LV", etc.?  I would be surprised if that were the case, but it's the only workaround I can see to the PESolution automation.

 

The final level in the Component Explorer is complicated, but the Shape Name dialog on the Developer tab helps to decipher where it comes from.

  - If the shape was created from a master, this value is the first portion of theMaster field in the Shape Name dialog.  This value is read-only, and from some VBA testing, it is the .Master.Name property, a colon, and the .MasterShape.Name property.  You can edit the Name value in the Shape Name dialog, but not the .Master.Name value.  (These may actually be the NameU properties, but using the English version of Visio, I can’t tell the difference.)

  - If the shape does not have a master, this value is the shape’s Name property when it was first added to the page.  If you rename the shape via the Shape Name dialog (which has <no master> in the Master field), the nameis not changed in the Component Explorer.

 

Unless I’m missing something big with the Process Engineering add-in, I will have to create my own custom shapes for use within our company, which is actually what the only ISA-approved Visio shape creator has done (http://www.megaflex.com/products/symbols-pro/).  It’s very disappointing that Microsoft has invested so much time into creating the engineering shapes that cannot be used for PFDs and P&IDs by end-users (the Instrument shapes in particular).

 

Again, thank you for reading this very long post.  I look forward to seeing this discussion grow!



Viewing all articles
Browse latest Browse all 2333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>