To Access and Share .NET or VBA Subassemblies

Custom subassemblies that have been created using .NET or VBA can be exported and imported using a package file. Subassemblies created from polylines cannot be included in a package file.

A package file contains all the files necessary for the custom subassemblies to work. Once the package file is created, you can import the package file contents into Autodesk Civil 3D using the ImportSubassemblies command, and copy the custom subassemblies directly into a tool palette or catalogue. You can also share a package file with others. For example, you could attach a package file containing one or more subassemblies to an e-mail, or use other file transfer methods.

For more information on creating package files, see "Exporting Custom Subassemblies Using a Package File" in the Developer's Guide.

To copy subassemblies from a package file to a tool palette

  1. Click Home tabPalettes panel.
  2. Open the tool palette that you want to copy the subassemblies into. You may open an existing tool palette or create a new one.
  3. Click Insert tabImport panelImport Subassemblies Find.
  4. In the Import Subassemblies dialog box, click the folder icon to navigate to and select the package file.
  5. Clear the Link Directly to .PKT Files tick box. The PKT files are installed by default to Imperial and Metric folders in the following location: C:\ProgramData\Autodesk\C3D 2024\eng\Subassemblies\.

    Note: The Link Directly to PKT Files setting can be selected for PKT files created with the Subassembly Composer. It does not apply to PKT files created using .NET or VBA that are included in a package file.
    Note: On some computers, the ProgramData folder may not be visible by default. For more information about viewing the ProgramData folder, see the following section.
  6. In the Import To section, click Tool Palette, and then select the desired tool palette in the drop-down list.
    Note: You can import the subassemblies to a tool palette and to a catalogue at the same time. When you import subassemblies to a catalogue, they automatically get imported to the My Imported Tools catalogue. If the My Imported Tools catalogue does not exist, it is automatically created.
  7. Click OK.
Note: Subassemblies created from polylines cannot be included in a package file. Package files are intended for sharing custom subassemblies that have been created using .NET or VBA.

To view the ProgramData folder

  1. Open the Windows Control Panel and click the Appearance and Personalisation link.
  2. Under Folder Options or File Explorer Options, click Show Hidden Files and Folders.
  3. In the dialog box that is displayed, select Show Hidden Files, Folders and Drives. Click OK.

To copy subassemblies from a package file to a catalogue

  1. Click View tabPalettes panelContent Browser.

    Tip: When working with both the Autodesk Civil 3D workspace and the Content Browser, you may find it useful to have the Content Browser window displayed at all times. To do this, right-click in the Content Browser title bar and select Always On Top.
  2. Click Insert tabImport panelImport Subassemblies Find.
  3. In the Import Subassemblies dialog box, click the folder icon to navigate to and select the package file.
  4. In the Import To section, click Catalogue Library/My Imported Tools.
    Note: You can import the subassemblies to a tool palette and to a catalogue at the same time. When you import subassemblies to a catalogue, they automatically get imported to the My Imported Tools catalogue. If the My Imported Tools catalogue does not exist, it is automatically created. Once the subassemblies are in the My Imported Tools catalogue, you can then copy them to other catalogues.
  5. Click OK.
Note: Subassemblies created from polylines cannot be included in a package file. Package files are intended for sharing custom subassemblies that have been created using .NET or VBA.