Creating multiple 2d/3d views

Once you are accustomed to incorporating a separate 2d script for a saved object, you may want to look at incorporating additional view types into a 2d or 3d script. This also works to combine multiple objects or geometries into a single object with toggles to switch between them. Each geometry will be saved out as a temporary object to copy/paste script from, just as in option 2 for a Custom 2d Plan Symbol. I use this frequently to combine a “collection” of model objects into a single library part. For example, I have created a few Waterworks faucet objects, each containing 6-10 faucet models and configurations.

In this example we will look at applying a detail level option for the plan symbol, one standard detail and one simplified.

Step 1: Create a new parameter to toggle between both scripts. A parameter Variable must not include spaces or special characters, but can include underlines or numbers. For this Variable we will call it Plan_Symbol_Det. Select the type as Text (the ABC symbol from the drop down). Last, give it a name that will be coordinated with a Parameter Script. We will call this Plan Symbol. Spaces are allowed in the name, since this is only a title that will appear in the object’s final parameter settings.

FIG. 4.1 New Parameter for Script Control

Step 2: Go to the parameter script tab and coordinate in a single line the Variable and options to be included in created parameter from Step 1. This is a simple line of text that can include as many options as you need. For this we will use the following:

VALUES “Plan_Symbol_Det” “Standard”, “Simple”

FIG. 4.2 VALUES Line of Parameter Script

Notice the location of (“) and (,). These are important to differentiate between the parameter variable and the values.

Now back in the parameters tab you will see the value column includes a flyout button which includes the values added to the parameter script.

FIG. 4.2 Check Value Column of Parameters

Step 3: Now the 2d script needs to provide an option that relates to the new parameters created. First we are going to use a series of If/Then statements to script the two options. The If/Then for this type of option is a GOSUB script, which essentially creates subparts to a 2d or 3d script, and uses the parameters to toggle between them. In this case the script reads as follows:

IF Plan_Symbol_Det = "Simple"         THEN GOSUB 100

IF Plan_Symbol_Det = "Standard"         THEN GOSUB 200

Now we create the sub-parts for the script to go to. This is as simple as typing the corresponding 100: and 200: at the beginning of the sub parts, and adding END at the end of the subpart to denote the script does not continue. This will prevent SUB 100 and SUB 200 from being read when “Simple” is selected in the parameter.

I use a line (or several lines) of !=========== to denote the separation between the sub scripts. Since there is a (!) at the beginning of the line, it is voided and only indicates that this section is ended for a quick locator when scrolling through what may amount to thousands of lines of script by the time the object is complete.

FIG. 4.3 2d Script Outline with Subs

Step 4: The last step in this process is to save out both symbols as separate objects, open them, and copy/paste their 2d scripts to the correct SUB from step 3. (this should simply replace the section reading !Paste simple level plan symbol script here. Lastly, whenever a change is made to a script window, check the script for errors. If no errors appear in any script window (3d, 2d, parameter), then the object can be saved and used.

Note that the objects that will be be pasted into the original script do not need preview images or attribute/parameter names. They are only temporary objects for generating the plan symbol scripts.

.

FIG. 4.4 Full 2d Script With Simple & Detailed Plan Symbols