Vous êtes sur la page 1sur 9

AUTODESK INVENTOR

Managing Styles and Style Libraries in Autodesk Inventor


This document contains concepts regarding the management of Autodesk Inventor Styles and Style Libraries.
It is recommended that you become familiar with Autodesk Inventor styles and know how to edit, create, and use the styles in an Autodesk Inventor document. Once familiar with this guide, it is recommended that you review the following documents:

Style Library Overview for Autodesk Inventor Transitioning to Style Libraries in Autodesk Inventor
The overview provides a general picture of what Style Libraries are and how they are used. The transition guide overviews the steps and tools used to prepare an existing project to use a Style Library.

Support for Editing Autodesk Inventor Style Libraries


Autodesk Inventor uses Extensible Markup Language (XML) files as a means of storing style information externally from Autodesk Inventor documents. XML files are used in two different ways to store style information:

Style Libraries a group of predefined XML files that Autodesk Inventor projects
actively reference

Exported styles one or more files with the extension .styxml, used to share
stylesbetween documents outside of a Style Library Note: Autodesk does not support the editing or use of these XML files outside of the tools provided inside Autodesk Inventor and the stand-alone tools: the Style Library Manager and Styles Management Wizard. Any manual edits to these files may result in corruption of data and render the files unusable by Autodesk Inventor.

XML Schema
The schema of the Autodesk Inventor Style Library XML files is subject to change from release to release.

General Style Management Rules


There are two general mechanisms that are the cornerstone of Autodesk Inventor styles management. These are the Style Name/Value, and substyles. All management interactions between documents, styles, and Style Libraries use these two mechanisms to ensure that the end object using a style has all required information.

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

Style Name/Value
Autodesk Inventor uses the style name as the unique style identifier. No two styles of the same type can have the same name in the same container. For example, inside a single drawing, there can only be one dimension style named Default (ANSI). However, there can be a dimension style named Default (ANSI), and a text style name Default (ANSI) in the same drawing, because they are two different style types. When Autodesk Inventor compares two styles of the same name, it checks all of the properties in each style to see if they are equal. This comparison is a value comparison. If a style in a document has a name match to a style in a library, and the values of these two styles are equal (every attribute is the same value), this is considered an exact Name/Value match. The concept of a Name/Value match is used by Autodesk Inventor to perform automated tasks

Substyles
Styles are a means of encapsulating and reusing sets of properties inside of Autodesk Inventor. Autodesk Inventor takes advantage of this encapsulation to reuse one type of property set as a subset of another. This is evident where one style references another style that contains needed information. When a style is referenced by another style, it is regarded as a substyle. For example, dimension styles have three substyles:

Primary Text Style: used to format the primary units in a dimension. Tolerance Text Style (optional): used to format the tolerances units. Leader Style: used to format Hole Notes and Leader Notes.
A style only knows the name of its substyle. It knows nothing about the values of the properties contained in the substyle. When Autodesk Inventor checks if a style in one container (a document or a Style Library) is an exact Name/Value match to a style in another container, it verifies that each style is referencing a substyle of the same name. A Name/Value match between the substyles is not necessary for the owning style to have an exact Name/Value match. When a style is copied from one container to another, Autodesk Inventor ensures that any substyle required by the parent style is present in the destination container. If the substyle does not exist in the destination container, it is copied along with the parent style. If the substyle does exist, the destinations version of the substyle is used.

Documents in Style Management


Documents, and the objects inside of a document, are the consumer of styles. Documents are the main point of interaction and management. All style creation, editing, and management between a document and a Style Library is done in the context of an Autodesk Inventor document.

Style Libraries in Style Management


Style Libraries are the central storage location of styles for projects set to use the library. The Style Library is designed to assist in the management of styles between multiple documents and multiple users, as well as provide some capacity benefits for large assemblies. The Style Library provides a means of insuring all users have access to the most current style information

Templates in Style Management


Prior to Autodesk Inventor 9, templates were the primary source of styles. With Style Libraries, the role of templates in style management changes depending on the projects Use Style Library setting. Templates now specify which styles are to be used by default when a new document is created. When a Style Library is used in a project, the style definitions are copied from the Style Library when a new document is created. 2

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

Managing Styles Using Style Libraries


In parts, assemblies, and presentations, all styles from the active library, as well as styles cached in the local document, are shown in the style drop-drop list on the main toolbar or wherever a style is chosen. In drawings, only styles that are locally cached, or are part of the active standard, are displayed and available for selection. Day-to-day interactions between a document and a Style Library are transparent. Any style used inside of a document is automatically copied (cached) to that document. This ensures that the document has required style information if a library becomes unavailable, or if a document is accessed from a project with a different Style Library or a project without a Style Library. Considerations that influence what styles (or version of a style) are available:

The document version of a style always overrides. If a style is in both a document and a
library, and the two do not have the same values, the version in the document is used. Editing styles always takes place inside of a document. The Style Library cannot be edited directly.

In drawings, styles are filtered by the active standard. Each standard has a list of

Available Styles (found on the Available Styles tab of the Standard edit window). These styles appear at the top of the Styles drop-down list of drawing documents as well as style editors that reference a substyle. Note: These are not the only styles that can be used in the document. of a library to be used in a document

Any style cached in a document is available for use. This allows styles that are not part

Automated Management of Styles in Autodesk Inventor


The most common tasks of managing styles between documents and Style Libraries are performed automatically by Autodesk Inventor. Automatic Copy into Document When a style from the library is used, it is copied into the document automatically with all necessary substyles. Automatic Style Cleanup Styles that are automatically copied into a document are automatically removed from that document whenever they are no longer in use. This allows the document to remain uncluttered of unused metadata without need for user intervention. Automatic cleanup only happens when Autodesk Inventor is sure that no style data is lost if the style is removed. Styles are only automatically removed from a document if:

The style was copied by Autodesk Inventor automatically into the document. The style is not used by any other object or is a substyle of any other style in the
document

The style is an exact Name/Value match to a style in the current library


If Autodesk Inventor cannot find an exact Name/Value match for the style in the library, or if a style was manually cached from a library into a document using the Style Editors Cache in Document function, Autodesk Inventor leaves the style in the document until it is manually purged.

Manual Management of Styles in Documents


Users perform the majority of style management tasks inside of Autodesk Inventor.

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

Editing and Creating Styles The most common task involving the direct management of styles is either editing an existing style or creating a new style. Styles are always edited or created inside an Autodesk Inventor document (part, assembly, drawing, or presentation). Styles are edited in the style editor, even if the style has not yet been copied into the document. Styles are automatically copied from the library into a document for edit.Since the Style Library cannot be edited directly, an edited or newly created style must be saved to the library from a document. To save a style to a library:

Right-click the style in the Style Editor, and select Save to Style Library Select Save Styles to Style Library from the Format menu in Autodesk Inventor.
Saving a style to a library only saves its substyles if they do not exist in the library. If a substyle already exists, it must be saved explicitly to replace the library definition. Substyles are saved to a library with the referencing style using the Format > Save Styles to Style Library command. Renaming Styles Inside the Style Editor, a style is renamed by right-clicking on the style name, and selecting Rename Cached Style. Renaming a style in the editor only affects the documents copy of a style. The library copy of a style is never affected by this function. There are two effects of renaming a cached style:

All objects using the old style, and all locally cached styles using the old style as a
substyle, now use the renamed style.

Once a style is renamed, it looses any link to a Style Library (is considered to have no
match to a style in a library), unless its name is changed to a name that matches another style in the library itself.

A locally cached style cannot be renamed to the same name as a style that is already cached. For example, if two material styles, one named Aluminum and another named Aluminum 6061, exist in a document, Aluminum cannot be renamed to be Aluminum 6061. However, if Aluminum is in a document, and a material style named Aluminum 7075 existed in the current library, Aluminum can be renamed to Aluminum 7075, since Aluminum 7075 didnt already exist inside the document

Importing and Exporting Styles


Style Libraries are not the only means of sharing styles. The Pre-R9 Organizer tool used to copy styles between documents has been replaced with an Import/Export function. This command is accessed from the style editor. Styles are exported to a *.styxml file, and then imported into other Autodesk Inventor documents. The differences between using a Style Library to share styles and using import/export are:

No active link is made to an exported style file, meaning there is no update style
mechanism for exported styles.

On Import, any style of the same name is automatically overwritten by the imported

styles values. When updating from a Style Library, replacing styles and substyles must be confirmed or done explicitly by the user. The *.styxml file is a self contained file that includes all substyles required by exported styles. A Style Library keeps each type of style in a distinct, separate XML file. See the Style Library Contents section on page 7 for more details on the file structure of a Style Library

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

Manually Copying Styles into Documents


Styles are copied into a document from a Style Library through the style editor by selecting the styles, right-clicking, and selecting Cache in Document. When manually copied in this manner, the styles stay in the document until they are manually purged, even if they are not used by objects in the document itself. This is a useful mechanism for sending a document to another person along with all of the styles they might need, but do not want to share your entire library.

Updating Styles
When a style changes in a library, that change is consumed by all documents using that style by performing a style update. Updating a style from the library is always manual, and is done in one of two ways:

From Autodesk Inventor Menu, click Format > Update Styles From Style Editor, click the styles, right-click and select Update Style
Under certain conditions additional confirmations may be requested in order to update a style. This primarily happens when the style was edited locally in the document. Updating a style is always a manual process and must be initiated by the user. Updating a style does not update its substyles. Substyles must be updated separately. Substyles are updated simultaneously with the referencing style using the Format > Update Styles command

Removing Styles Manually


Styles not used by an object or another style can be removed from a document manually at any time. This is done in one of two ways:

From the Autodesk Inventor menu, click Format > Purge Styles. This purge focuses on
or all styles in the current document. Unused styles and substyles are purged in a single operation. From the Style Editor: click a style, right-click and select: Purge Style to remove only the selected style.

Purge Style & Substyle to remove the selected style and all of its substyles.
Note about substyles and manual removal from a document: If a style cannot be purged from a document, check the following to verify if a style is referenced by:

An object (sketch geometry or sketch text in Drawing Resources) Any Standard cached in a drawing. The style may be referenced as an Available Style. Any Object Default style cached in a drawing. Object Defaults can be set to use styles
that are not Available Styles in a standard.

Other styles that commonly use the style as a substyle.


The most common styles used as substyles are: Color styles (used by Materials) Text styles (used by most drawing styles) Leader styles (used by most drawing styles) Layers (used by Standards and Object Defaults)

Style Libraries and Templates


Templates define default styles for new documents. The default styles required by a document are listed in Document Settings (Tools > Document Settings or Format > Active Standard) on the Active Standard tab.

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

The default styles that are defined for each document type are:

Drawings: Standard. Parts/Weldments: Lighting, Material. (Material is set in the Weld Properties. Right-click
the Weld browser node, select Properties, and then the Physical tab.)

Assemblies/Presentations: Lighting. Sheet Metal: Lighting, Material. (The Default material is set by the active Sheet Metal
style in the template.) Note: Weldments also have a Standard setting on their Active Standard tab. This is not the same as the Standard style used by drawings. This is one of six international standards (ANSI, ISO, DIN, BSI, JIS, or DIN) that define how the weld features are characterized.

When a new document is created, the styles for that document are pulled from the Style Library. However, styles in a template that are not in the library are added to the new document as well

iPart Factories and Style Management


iPart Factories have unique style management considerations. iPart factories can specify two different styles in the iPart factory table: Materials and Colors. Colors are also indirectly specified as substyles of Materials. When a part is converted into an iPart for the first time, all available color and material styles in the current library are cached into the iPart factory document. This insures that an iPart factory can publish iPart members in the absence of a Style Library. Styles included in an iPart factory remains cached until manually removed. Automatic style cleanup does not apply to iPart factories. All other rules and functions for style management are the same as other part documents. Styles can be created, edited, manually cached, or manually removed from iPart factory documents at any time.

Sharing Documents Across Projects


Since all used styles are copied into a document, if the document is moved to a project that has a different Style Library or no Style Library at all, the document continues to use the cached style. Any styles that were manually cached are available to the document in the new project. The document styles do not have to be in the Style Library of the new project. If Style Library of the new project has styles that are a name match, or a name/value match, they are treated in the same manner as if they were in the original project. For example, any styles that are an exact name/value match to styles in the new library are automatically removed when they are no longer used by the document. If the styles in the document find a name match, but not a name/value match, they continue to retain their original values unless or until they are updated to match the new librarys version of the style.

Styles and External Data


Fonts (used by text styles) and bitmaps (optionally used by color styles) are not stored inside an Autodesk Inventor document or Style Library. This type of external data is not managed by Autodesk Inventor and must be managed manually.

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

Style Library Contents


A Style Library is a group of specifically named XML files in a directory. There is one XML file per style type (for example: color.xml, text.xml). In Autodesk Inventor 10, there are 20 predefined styles. Material Lighting Colors Standard Balloon Center Mark Datum Target Dimension Feature Control Frame Hatch Hole Table ID Layers Leader Object Defaults Parts List Surface Texture Text Weld Bead Weld Symbol

Since the names of the XML files must be the same for each Style Library, only one library can exist in a directory. To be considered a valid Style Library, all predefined XML files must be present in the directory. If any of the XML files are missing, an error message is displayed. See Incomplete Style Libraries below for more detail. Note: An exported style file (*.styxml) cannot be used as part of a Style Library.

Style Library Manager


The Style Library Manager is a stand-alone tool used only for the administration of Style Libraries. This tool works directly with the Style Library XML files on disk, and is not used in the management of styles inside Autodesk Inventor documents. It is accessed from the Microsoft Windows Start Menu, and is found in the Tools submenu for Autodesk Inventor. The Style Library Manager performs three basic management functions:

Creation of new Style Libraries Simple style management inside of Style Libraries Management of styles between multiple Style Libraries

Creating Style Libraries


Autodesk Inventor installs with a default Style Library designed to leverage of all new capabilities of styles. Users can create their own Style Libraries as well. Style Libraries are created in two different ways: Copy an existing Style Library. Create an empty Style Library that is populated manually. In the Style Library Manager > Style Library 2 pane, click the New Style Library button to display the Create New Style Library dialog box. Copy an existing Style Library: This is the default creation method. You must specify a target directory for the new Style Library, and specify the source library to copy. The source library is chosen by selecting an existing Autodesk Inventor project that has a Style. Library associated with it, or by browsing to a specific directory that contains a valid library.

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

Create an empty Style Library: Select the Create Empty Style Library option in the dialog box, and specify the target directory for the Style Library. Once created, the new Style Library appears in the Style Library 2 pane of the Style Library Manager. With either creation method, the target directory for the new library cannot have a Style Library already present. After creation, styles are added or removed using the Style Library Manager. Styles are also added or edited using the Style Editor in Autodesk Inventor.

Style Management Inside Style Libraries


Two style management tasks are performed using the Style Library Manager. Rename: A style can only be renamed inside of a library using the Style Library Manager. Renaming a style in the library does not rename the same style in any other library or document. Once a style is renamed, all document copies of the style loose their name match and are considered locally cached style. Delete: The only way to delete a style from a library is through the Style Library Manager. Both commands are accessed from the right-click menu when selecting one or more styles. Caution: There is no Undo in the Style Library Manager. Renaming, copying, or deleting of styles cannot be undone. Creating a backup copy of your library prior to making changes is recommended.

Style Management Between Style Libraries


Styles are copied between libraries using the Style Library Manager. To copy a style from one library to another, load the source library into Style Library Manager and click the Copy Selected Styles button between the Style Library 1 and Style Library 2 panes. See the Style Library Manager Help for more details.

Preventing Style Library Changes


In a multi-user environment, CAD administrators may want to prevent users from making changes to a Style Library. This is accomplished by setting the library to Read-only. Two methods are available to make a Style Library read-only:

Set the project Use Style Library option to Read Only. Use a Microsoft Windows file property setting. In Microsoft Windows Explorer, select all
the XML files that make up the library or the library directory folder itself, right-click, select Properties, and set to Read Only.

In Autodesk Inventor, both methods are treated identically when accessing Style Libraries. If a single XML file is read-only, the entire library is treated as read-only. An administrator can have two versions of a project file. One is for users (Use Style Library = Read Only), which prevents changes, and one is for administrators (Use Style Library = Yes), to actively edit the library without dealing with the individual Windows file properties of each XML file. For many workgroup setups, this may be sufficient for management of Style Libraries. The project file option has the disadvantage that any interaction done outside Autodesk Inventor treats the Style Library as read/write. This includes the Style Library Manager, which works with library files outside the context of an Autodesk Inventor project. The Style Library Manager only references project files as a shortcut to the XML files.

Autodesk Inventor: Managing Styles and Style Libraries in Autodesk Inventor

Vaulting Style Libraries


Style Libraries are not directly supported by Autodesk Vault in Autodesk Inventor 10. Style Libraries are manually vaulted and managed using the Vault Explorer.

Get, Check in, and Check Out must be done through the Vault Explorer. through the file properties, just as Vaulted Style Library XML files are set to read-only rd If editing the Style Library is required, all XML files must be checked out.

any standard Autodesk Inventor file or any other 3 party file that is vaulted manually.

Incomplete Style Libraries


Though a Style Library is made up of several separate XML files, Autodesk Inventor and the Style Library Manager treat the library as a single entity. If some of the predefined XML files required for a Style Library are missing from a directory, Autodesk Inventor produces an error message indicating files are missing and cannot be loaded. Style Libraries should be backed up regularly. The best way to share a subset of styles from a library (for example, a single standard or all materials form a specific library) is to use the Import/Export styles function in the Style Editor, or create an empty Style Library and copy the desired styles using the Style Library Manager.

Restoring the Autodesk Inventor Default Style Library


A utility for restoring the default Design Data directory files is located on the Autodesk Inventor Install CD in the Support directory. This utility replaces the original default Style Library that ships with Autodesk Inventor, as well as the Thread.xls and Clearance.xls spreadsheets.

Managing Multiple Libraries


To simplify management of multiple Style Libraries, consider the following:

Keep all working Style Libraries as read-only to prevent accidental changes. Use a parent/child Style Library scheme.

The parent is a library unused by any active project. All project Style Libraries are considered children. The administrator makes all changes in the parent version. Push changes to a child by copying the styles from the parent version using the Style Library Manager. Try to reuse styles if possible. Most users utilize the same Material, Color, and Lighting styles, even if they require a different set of drawing-related styles. For management of drawing related styles, give the primary Standard and its Object Defaults unique names for each project. Reuse Dimensions, Text, and Layers as much as possible.

Pack and Go
The Autodesk Inventor Pack and Go utility optionally includes a Style Library. By default, a projects Style Library is included in the target directory created by Pack and Go. This is true even if the default library is used, because the recipients default library may differ from the one used by your project(s). The packed Style Library is included in the Pack and Go project in a subdirectory called Design Data. The Pack and Go project file has the Use Style Library setting the same as the original project, but its Style Library folder option is set explicitly to the Pack and Go location of the packed up Style Library.

Autodesk and Autodesk Inventor are trademarks or registered trademarks of Autodesk, Inc., in the USA and/or other countries. All other brand names, product names, or trademarks belong to their respective holders. Autodesk reserves the right to alter product offerings and specifications at any time without notice, and is not responsible for typographical or graphical errors that may appear in this document. 2005 Autodesk, Inc. All rights reserved.

www.autodesk.com

Vous aimerez peut-être aussi