<< Click to Display Table of Contents >> Create Folder Links |
This chapter describes how you can create and use Folder Links in the SymbolsPalette.
A Folder Link is essentially a shortcut to a Windows folder.
The project used in this chapter can be downloaded with the following Link:
In this chapter we have a folder in our project which has two sub folders. In Blocks there are two drawing which are made out of AutoCAD Plant 3D Symbols and Line Segments and one drawing which contains just standard AutoCAD Lines. The PNG folder contains some images.
|
Enable Edit Mode first (see Edit Mode). There are two ways to add a Folder Link to the SymbolsPalette. One way is to drag & drop a folder from your Windows File Explorer into the left side of the SymbolsPalette. The Windows folder name will be alphabetically positioned within the class tree. The Folder link will be shown with the next level of sub folder (if any exist). If you click on the blocks folder you will see the Thumbnail images of the drawings. The PNG folder shows the preview of the images. The second method to create a Folder Link is to click on the blank area and make a Right-Click and select Add Folder Link... from the context menu. Now the Add custom folder dialog opens where you can use drag and drop also to bring the folder into the dialog. Or you click on the button. Now another Windows dialog opens where you select the folder you want to link to. This folder appears under the Root directory. With the you can delete the folder path again if needed. All other options in this dialog will be described further down. After closing the dialog with OK you will see the folder as before. You can drag and drop also to add a folder under a P&ID class. The blue arrow will indicate where the folder will be placed. Now Blocks is located under Engineering Items class. And the PNG folder again in the blank area. And this is the final result. If you want to use the context menu you select the P&ID class under which the folder should be located and use Add Folder Link.... You select the folder and click on OK. The result looks like this: At the end of the process disable the Edit Mode again (see Edit Mode). |
If you open the SymbolsPalette and you see a broken folder icon it means, that the path order folder name cannot be found anymore. If you click on such a broken folder icon you will get the following message with the details about the path defined for this Folder Link. This dialog will appear only once. When the path is reinstated/fixed while the SymbolsPalette is open, the icon switches back to the normal folder icon. If you click on the Refresh button, the sub folders will be shown too.
|
Enable Edit Mode first (see Edit Mode). Folder Links can be removed by using Remove Folder Link from the context menu. At the end of the process disable the Edit Mode again (see Edit Mode). |
Enable Edit Mode first (see Edit Mode). If you want to make changes to the settings of the Folder Link you make a right-click on the folder and select Edit. And if you are done you click OK to save your changes. At the end of the process disable the Edit Mode again (see Edit Mode). |
Root directory and Display Name of Folder Links
Enable Edit Mode first (see Edit Mode). By default, the Display Name is the name of the folder at then end of the selected path. However, you can click on the grey check sign and it becomes green. Now you can edit the Display Name independent of the folder name. By changing the Display Name, the new name will be alphabetically reordered, when you click on the OK button in the Edit custom folder dialog. Now you see the new name at the new location. In addition, changing the Root directory will not change the Display Name if the green check sign is shown. If you click on the green check sign, it will become grey again and the Display Name will be restored to the selected folder name. At the end of the process disable the Edit Mode again (see Edit Mode). |
Content Options for Folder Links
Enable Edit Mode first (see Edit Mode). With the Content Options you can define which file types you want to see in the Folder Link and which Insert options should be preset when inserting a drawing. Content filter If you use Add Folder Link from the context menu, only dwg will be selected. This is why you see all the dwgs in the Blocks folder. But you don't see any images in the PNG folder. If you select the other file types (actually for this example png would have sufficed)... ... the selected file types show up one after the other under Content filter. If you select the PNG folder now you will also see the images. Commands The two Command boxes are disabled. They just have informative character and let you know which AutoCAD command is used to either insert drawings or images. Use Arguments Before we look at the options in the dialog, let's have a look at the AutoCAD command. You see here the same options as you have in the Edit custom folder dialog. If you need more information about the INSERT command, please check the AutoCAD documentation. By default, no options are checked. If you would later insert a drawing, then you would be able to use all the options of the INSERT command while inserting. Insertion Point If enable the Insertion Point option, you can define the Basepoint when inserting. In this case, that drawing will be inserted at 0,0,0 and then you can change the Insertion Point before continuing with the insertion. If you enable any of the options, the Use Arguments checkbox will be enabled automatically. As soon as all options are disabled, the Use Arguments checkbox will also be disabled. Scale Enabling Scale allows you to predefine the scale factor for X,Y, and Z. If this option is enabled, you will not be able to change the scaling during the insertion command. If you enable any of the X,Y, or Z scaling checkboxes, the checkbox for Scale will be disabled automatically. Now you can use individual scaling factors. If you enable the checkbox for Scaling again, then the X,Y, and Z checkboxes will be disabled automatically. Rotation Enabling Rotation allows you to predefine the rotation angle. If this option is enabled, you will not be able to change the rotation during the insertion command. Explode Enabling Explode allows you to predefine whether a drawing should be exploded or not during the insertion command. If the checkbox behind Explode is not enabled, then the drawing will not be exploded when inserting. At the end of the process disable the Edit Mode again (see Edit Mode). |
Enable Edit Mode first (see Edit Mode). With the Hide known extensions you can enable or disable the file extensions in the SymbolsPalette. If enabled, the file extensions are not shown. The same for the image files. With Show preview image (if possible) you can define whether you want to see the preview images or the file type images of Windows. Here the example for DWGs. And here for the PNG file. At the end of the process disable the Edit Mode again (see Edit Mode). |
Inserting Drawings from Folder Links
Now we will see how drawings are inserted and how the Arguments work while inserting. In the first example we don't have any arguments enabled. First we can select the insertion point. Next the X scale factor. Next the Y factor. And finally the rotation angle. If you want to use the Basepoint, Explode, or Repeat options, you would need to type in these options in the command line. The final result is the AutoCAD block still not exploded. Now we use these settings. If we insert one of the P&ID blocks, we can again define the insertion point. But that's it. If we select one of the P&ID Symbols we see, that the block was exploded upon insertion into the P&ID objects (Symbols and Pipe Line Segments).
|
Inserting Images from Folder Links
For images there are no options which can be set. If you select an image from the SymbolsPalette you can again define the insertion point. And then the scaling. Finally the rotation. And then it looks like this.
|
Opening any file from Folder Links (unsupported feature)
Enable Edit Mode first (see Edit Mode). Officially only dwgs and images are supported as can be seen from the file extensions in the Edit custom folder dialog. However, it is possible to open any file from the SymbolsPalette with some manual manipulation. This is how it will look like at the end. If you check the \ACPlantTools\PlantExpressTools\SymbolsPalette in your project you will find the SymbolsPaletteCustomClasses.xml. If you open the file in a text editor you will see, that it is pretty empty. Now you drag and drop the Block and Images folder into the SymbolsPalette and disable the Edit Mode. After that close the SymbolsPalette. If you open it now, you will see, that there is much more content. The first important line is the line with the <ContentFilter> tag. Here you have all file extensions which are supported by the SymbolsPalette. Then you have a section for dwg (lines 9 - 17) and a section for the images (lines 18-20). If using a Collaboration project you have to check out the SymbolsPaletteCustomClasses.xml yourself. Otherwise the file is read-only and the changes you are about to make won't be checked in to BIM360/ACC. First we add the required file extensions which should be supported by the SymbolsPalette. Next we add another section for the other file extensions which should be opened if you click on them later in the SymbolsPalette. Maybe just copy lines 19-21 and then adapt the extensions and the command. To make it a bit easier you can copy the command line from the next line to avoid any type-Os. <Command>(defun c:tmp ()(command "shell" (strcat "\"" (getstring T "enter file name: ") "\""))) tmp</Command> If you open the SymbolsPalette now, you may need to click on the Refresh button in order for the changed file to be loaded. After that you will see the xlsx and pdf from the sample project provided at the beginning of this chapter. If you click on the Excel files a Shell/DOS Box opens and stays open while the Excel file is open. And then the Excel file gets opened. After closing the Excel file, the Shell/DOS Box closes too. The same works for the PDF file. Since this isn't a supported feature of the SymbolsPalette there is a caveat. If the ContentFilter line looks like this... ...and now you open and close the Edit custom folder dialog and close the SymbolsPalette (only then the SymbolsPaletteCustomClasses.xml is written), the additional extensions are gone. So you have to add them again. At the end of the process disable the Edit Mode again (see Edit Mode). |
Next Chapter: Create Custom Class