UF_PART_cleanup
Defined in: uf_part.h
int UF_PART_cleanup(unsigned int option_mask )
overview 概述
Enables you to specify one or all of the part cleanup procedures. Each part cleanup procedure has a definitions which represents a bit mask. You OR these bits together to obtain the option_mask argument. The part cleanup procedure for each bit is as follows.
UF_PART_cleanup_highlight - In internal Open API, turns off object highlighting for all the displayable objects in the root part. NOTE: this will not remove objects from the selection list, it simply unhighlights everything. In external Open API programs, this option does not do anything.
UF_PART_cleanup_all_groups - Deletes all group objects of the work part that have no members.
UF_PART_cleanup_unnamed_groups - Deletes all unnamed groups of the work part that have no members.
UF_PART_cleanup_unreferenced - Deletes all unreferenced, condemned objects in the work part that have a reference count of zero and that have no back links. Condemned objects with only one back link are deleted provided the single back link is the view dependent link from the object to it's dependent view.
UF_PART_cleanup_feature - Performs Solids Clean-Up. The system analyzes all solid bodies to ensure that all of their faces and edges are present and consistent with the Parasolid representation. If an error is detected the system attempts to repair the part.
UF_PART_cleanup_all - Sets all bits, so that all part cleanup functions are run on all parts. To only run on the work part you must clear the bits UF_PART_cleanup_parts_all and UF_PART_cleanup_parts_components by specifying UF_PART_cleanup_all & ~UF_PART_cleanup_parts_all & ~UF_PART_cleanup_parts_components
UF_PART_cleanup_parts_all - Cleans up all fully loaded parts in the session.
UF_PART_cleanup_parts_components - Cleans up the work part, and if the work part is an assembly, it cleans up the components of the work assembly.
UF_PART_cleanup_spreadsheet - Deletes all spreadsheets from the part file.
UF_PART_cleanup_mating - Performs Mating Condition Clean-Up. The system analyzes all mating conditions to ensure that all their data is consistent. If an error is detected the system attempts to repair it. Note: this operation will load referenced parts.
UF_PART_cleanup_CAM_cleanup - Deletes orphan tool paths and deletes any of the following that are unreferenced: parameter sets, CAM geometry entities, post processor command sets, and non-cutting move data.
UF_PART_cleanup_fonts - Eliminates unused character fonts from a part.
UF_PART_cleanup_units - Eliminates unused units from a part.
UF_PART_cleanup_unreferenced_exps - Deletes all unreferenced (unused) expressions in the part. Also deletes all expressions that are only referenced by unreferenced expressions. For example: a=10 b=a Both a and b are deleted.
UF_PART_cleanup_occurrences - Removes redundant changes in all occurrences having same display properties as their prototypes.
UF_PART_cleanup_visual_editor - Deletes all visual editor data from the part file.
UF_PART_cleanup_hwo_force_demoting - Removes changes from all occurrences even if their display display properties are different from their prototypes. Beware UF_PART_cleanup_hwo_force_demoting is mutually exclusive with UF_PART_cleanup_occurrences.
UF_PART_cleanup_drafting - Part cleanup on drafting objects / drawings.
UF_PART_cleanup_sketch - Fix off-plane sketch curves
UF_PART_cleanup_delete_broken_interpart - Delete all inter-part links where one or more components in that inter-part link have been removed.
UF_PART_cleanup_delete_all_materials - Deletes all materials from the part file.
UF_PART_cleanup_delete_duplicate_lights - Deletes all duplicate light source objects from the part file. A light source object is considered a duplicate if it has the same name as another light source object in the part.
UF_PART_cleanup_delete_invalid_attributes - Deletes all invalid user attributes from the part file.
UF_PART_cleanup_unused_extract_refs - Deletes all unused edge/face reference in extract include the internal extract in product interface
使您能够指定一个或全部部件清理过程。每个零件清理过程都有一个表示位掩码的定义。将这些位放在一起进行 OR 以获得 option _ ask 参数。每个位的零件清理过程如下。在内部 Open API 中,关闭根部分中所有可显示对象的对象突出显示。注意: 这不会从选择列表中删除对象,它只是取消突出显示所有内容。在外部 OpenAPI 程序中,此选项不执行任何操作。删除工作部件中没有成员的所有组对象。删除工作部件中没有成员的所有未命名组。删除工作部件中所有引用计数为零且没有反向链接的未引用、受到谴责的对象。只有一个反向链接的被禁对象将被删除,前提是单个反向链接是从对象到其依赖视图的视图依赖链接。执行固体清理。该系统分析所有的实体,以确保他们的所有面孔和边缘是存在的,并与假体表示一致。如果检测到错误,系统将尝试修复零件。设置所有位,以便所有部件都运行所有部件的清理函数。为了只在工作部件上运行,你必须通过指定 UF _ Part _ clean up _ all & ~ UF _ Part _ clean up _ arts _ all & ~ UF _ UF _ Part _ clean up _ part _ Component UF _ Part _ clean-part _ all-在会话中清理所有满载的部件。清理工作部件,如果工作部件是一个程序集,则清理工作程序集的组件。从零件文件中删除所有的电子表格。执行交配条件清理。该系统分析所有的配对条件,以确保所有的数据是一致的。如果检测到错误,系统将尝试修复它。注意: 此操作将加载引用的部件。UF _ Part _ clean up _ CAM _ clean up-删除孤立工具路径,并删除任何未引用的以下内容: 参数集、 CAM 几何实体、后处理器命令集和非切割移动数据。清除部件中未使用的字符字体。清除部件中未使用的部件。删除部分中所有未引用(未使用)的表达式。还删除仅由未引用的表达式引用的所有表达式。例如: a = 10b = a a 和 b 都被删除了。UF _ Part _ clean up _ events-删除所有具有与原型相同的显示属性的出现中的冗余更改。从零件文件中删除所有可视化编辑器数据。删除所有事件中的更改,即使它们的显示属性与原型不同。请注意,UF _ Part _ clean up _ hwo _ force _ demating 与 UF _ Part _ clean up _ events 是相互排斥的。清洁绘图-绘图对象/图纸的部件清洁。修复离面草图曲线。删除部件间链接中的一个或多个部件已被删除的所有部件间链接。删除所有材料-从零件文件中删除所有材料。从零件文件中删除所有重复的光源对象。如果一个光源对象与该部分中的另一个光源对象具有相同的名称,则该光源对象被认为是复制品。从零件文件中删除所有无效的用户属性。删除抽取中所有未使用的边/面引用,包括产品界面中的内部抽取
UFUN例子
获取源码例子请搜索 里海NX二次开发3000例专栏
parameters 参数
| unsigned int | option_mask | Input | Bit mask that specifies the particular cleanup procedures to perform. 指定要执行的特定清理过程的位掩码。 |