ViewReference 5.2.0-alpha0002
See the version list below for details.
dotnet add package ViewReference --version 5.2.0-alpha0002
NuGet\Install-Package ViewReference -Version 5.2.0-alpha0002
<PackageReference Include="ViewReference" Version="5.2.0-alpha0002" />
paket add ViewReference --version 5.2.0-alpha0002
#r "nuget: ViewReference, 5.2.0-alpha0002"
// Install ViewReference as a Cake Addin #addin nuget:?package=ViewReference&version=5.2.0-alpha0002&prerelease // Install ViewReference as a Cake Tool #tool nuget:?package=ViewReference&version=5.2.0-alpha0002&prerelease
Usage
The addin can either be used via the commmand buttons added to the Inventor UI or by using the API with your own code.
Installation
- Download the ViewReferenceAddin-vX.X.X.zip file from the latest release
- Unzip the contents into
C:\ProgramData\Autodesk\ApplicationPlugins
- First time starting Inventor the Addin may need to be unblocked.
- Go to Tools Tab > Options Panel > Add-ins
- Find the addin in the Available Add-Ins list and select it. Then Uncheck the Block checkbox and check Load/Unloaded and Load Automatically
- Go to Tools Tab > Options Panel > Add-ins
If using the Addin's API outside of iLogic:
- The ViewReference.dll needs to be added as a reference to your project
- NuGet package available on NuGet.org and GitHub Packages
Addin UI
The View Reference panel is added to the Place Views tab when a drawing document is open.
Using the API
The GetViewReferenceAddin()
extension method for Inventor.Aplication
can be used to get the instance of ViewReferenceAutomation
.
ViewReferenceAutomation
includes the following methods that can be used:
Method Name | Description |
---|---|
CreateReferences(ViewReferenceSettings ) |
Adds references to all drawing views using the default settings |
CreateReferences(DrawingDocument , ViewReferenceSettings ) |
Adds references to all drawing views using the provided settings |
CreateReferences(DrawingView ) |
Adds references to the one view using the default settings |
CreateReferences(DrawingView , ViewReferenceSettings ) |
Adds references to the one view using the provided settings |
RemoveReferences(DrawingDocument ) |
Removes references from all drawing views |
RemoveReferences(DrawingView ) |
Removes references from the one view |
Extension Methods
Extension methods on the DrawingDocument
and DrawingView
types can also be used. Using these extension methods does not require getting an instance of ViewReferenceAutomation
.
DrawingDocument
Method Name | Description |
---|---|
AddViewReferences() | Adds references to all views in the drawing document using default settings |
AddViewReferences(ViewReferenceSettings ) |
Adds references to all views in the drawing document using provided settings |
RemoveViewReferences() | Removes references from all views in the drawing document |
DrawingView
Method Name | Description |
---|---|
AddViewReference() | Adds references to drawing view using default settings |
AddViewReference(ViewReferenceSettings ) |
Adds references to drawing view using provided settings |
RemoveViewReference() | Removes references from drawing view |
C# Example
var dwgDoc = (DrawingDocument)inventorApp.Documents.Open(@"C:\Work\MyDrawing.idw");
//Using ViewReferenceAutomation method
var viewRefAddin = inventorApp.GetViewReferenceAddin();
viewRefAddin.CreateReferences(dwgDoc);
//or using Extension method
dwgDoc.AddViewReferences();
iLogic Example
AddReference "ViewReference"
Imports ViewReference
Dim dwgDoc As DrawingDocument
dwgDoc = ThisDoc.Document
'Using ViewReferenceAutomation method
Dim viewRefAddin As ViewReferenceAutomation
viewRefAddin = ThisApplication.GetViewReferenceAddin()
viewRefAddin.CreateReferences(dwgDoc)
'or using Extension method
dwgDoc.AddViewRerences()
Configuration
If using the addin in the Inventor UI, settings can be set by clicking the Configure button in the View Reference Ribbon Panel. If using the addin API, customizations are made by passing in ViewReferenceSettings
into the CreateReferences
methods.
[!IMPORTANT] The API methods will not use the same settings that are set using the addin's configure window.
ViewReferenceSettings
Setting | Type | Description |
---|---|---|
CalloutStyle | string | Style string template for the view callouts |
DetailViewLabelStyle | string | Style string template for detail view labels |
SectionViewLabelStyle | string | Style string template for section view labels |
ProjectedViewStyle | string | Style string template for projected view labels |
AuxiliaryViewLabelStyle | string | Style string template for auxiliary view labels |
AddReferencesToDetailViews | boolean | Whether references should be added to detail views |
AddReferencesToSectionViews | boolean | Whether references should be added to section views |
AddReferencesToProjectedViews | boolean | Whether references should be added to projected views |
AddReferencestoAuxiliaryViews | boolean | Whether references should be added to auxiliary views |
Styling
Attribute tags are used to create templates for how the callouts and labels will appear. The AttributeTags
class contains all the possible tag strings.
Tag | Description |
---|---|
<VIEW> | View Name |
<VIEW SHEET #> | Sheet number the view is located on |
<VIEW SHEET NAME> | Sheet name the view is located on |
<PARENT SHEET #> | Sheet number the parent view is located on (where the view callout is located) |
<PARENT SHEET NAME> | Sheet name the parent view is located on (where the view callout is located) |
<DELIM> | Delimeter (only available in view labels) |
<SCALE> | View Scale (only available in view labels) |
Examples
Appears As | Template String | Template String Using AttributeTags Properties |
---|---|---|
B (2) | "<VIEW> (<VIEW SHEET #>)" | $"{AttributeTags.ViewName} ({AttributeTags.ViewSheetNumber})" |
B (Sh. 2) | "<VIEW> (Sh. <VIEW SHEET #>)" | $"{AttributeTags.ViewName} (Sh. {AttributeTags.ViewSheetNumber})" |
Privacy Policy
This application does not collect or store any personal data.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- Inventor.InternalNames (>= 0.1.3)
- Newtonsoft.Json (>= 13.0.3)
- stdole (>= 16.9.31023.347)
- System.Resources.Extensions (>= 4.7.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
6.0.1 | 69 | 11/18/2024 |
6.0.0 | 81 | 11/7/2024 |
6.0.0-beta0002 | 64 | 11/5/2024 |
6.0.0-beta0001 | 66 | 11/5/2024 |
5.2.1-beta0001 | 68 | 11/5/2024 |
5.2.0 | 154 | 2/13/2024 |
5.2.0-alpha0002 | 123 | 2/8/2024 |
5.1.1 | 111 | 1/27/2024 |
5.1.0 | 100 | 1/27/2024 |
5.0.6 | 156 | 9/11/2023 |
5.0.5 | 151 | 9/11/2023 |
5.0.4 | 151 | 9/11/2023 |
5.0.3 | 143 | 9/11/2023 |
5.0.2 | 146 | 8/18/2023 |
5.0.1 | 167 | 8/6/2023 |
5.0.0 | 163 | 8/5/2023 |