NX二次开发UF_STD_create_activeweb_file 函数介绍

126 阅读4分钟

UF_STD_create_activeweb_file

Defined in: uf_std.h 
int UF_STD_create_activeweb_file(char * working_directory, char * base_name, char * geom_server, char * server_directory, char * geometry_directory, char * attribute_server, char * attribute_directory, char * local_server_directory, char * local_geom_directory, char * local_web_directory, double tolerance, int mode_flags )

overview 概述

Create an ActiveWeb output file from geometry definitions in the part.

NOTES: This is a WNTI only function Most of the input parameters can be left as empty strings and appropriate values will be assigned from environment variables. The following environment variables are used:

Variable Default for Field UGII_ACTIVEWEB_GEOM_SERVER Node name for geometry server UGII_ACTIVEWEB_ATTR_SERVER Node name for attribute server UGII_ACTIVEWEB_SERVER_DIR Relative path for amm files UGII_ACTIVEWEB_GEOM_DIR Path for geometry files UGII_ACTIVEWEB_ATTR_DIR Path to attribute database directory UGII_ACTIVEWEB_LOCAL_SERVER Local path to amm directory UGII_ACTIVEWEB_LOCAL_GEOM Local path to geometry directory UGII_ACTIVEWEB_LOCAL_WEB Local path to web server directory

EXAMPLE:

UF_STD_create_activeweb_file( "c:\temp", "cypci204", "AmGeombase", "c:\GeomFiles\", "phantom", "c:\AttrDatabase\", "", "", "", 1.0, UF_STD_ACTIVEWEB_CREATE_ATTR | UF_STD_ACTIVEWEB_ERASE_LOG );

This command would generate files in the temp directory. The geometry server is "cypci204" and the local directory for amm files is "AmGeombase". Attributes are on "phantom" under the directory c:\AttrDatabase. No attempt will be made to move files to output directories so all of the generated files will be in the working directory. The flags are set so that attributes are created and the log files will be erased.


根据零件中的几何定义创建 ActiveWeb 输出文件。注意: 这是一个 WNTI 函数,大多数输入参数可以保留为空字符串,适当的值将从环境变量中分配。使用以下环境变量: 变量默认字段 UGII _ ACTIVEWEB _ GEOM _ SERVER 几何服务器的节点名称属性服务器 UGII _ ACTIVEWEB _ ATTR _ SERVER 节点名称属性服务器 UGII _ ACTIVEWEB _ SERVER _ DIR amm 文件相对路径几何文件 UGII _ ACTIVEWEB _ GEOM _ DIR 路径属性数据库目录 UGII _ ACTIVEWEB _ LOCAL _ SERVER 本地路径属性目录 UGII _ ACTIVEWEB _ LOCAL _ GEOM几何目录 UGII _ ACTIVEWEB _ LOCAL _ WEB 的本地路径 web 服务器目录 EXAMPLE: UF _ STD _ create _ activeweb _ file 的本地路径(“ c: temp”,“ cypci204”,“ AmGeombase”,“ c: GeomFiles”,“ Phantom”,“ c: AttrDatabase”,“”,“ ,”,1.0,UF _ STD _ ACTIVEWEB _ CREATE _ ATTR | UF _ STD _ ACTIVEWEB _ ERASE _ LOG);此命令将在 temp 目录中生成文件。几何服务器是“ cypci204”,amm 文件的本地目录是“ AmGeombase”。属性位于 c: AttrDatabase 目录下的“幽灵”上。不会尝试将文件移动到输出目录,因此所有生成的文件都将在工作目录中。设置标志是为了创建属性并擦除日志文件。

UFUN例子

获取源码例子请搜索 里海NX二次开发3000例专栏

parameters 参数

char *working_directoryInputThe working directory to be used for data files.
用于数据文件的工作目录。
char *base_nameInputThe default root name for all the generated files.
所有生成的文件的默认根名称。
char *geom_serverInputThe node name or IP address of the geometry server.
几何服务器的节点名或 IP 地址。
char *server_directoryInputThe relative directory path on the geometry server for the .amm files.
几何服务器上. amm 文件的相对目录路径。
char *geometry_directoryInputThe relative or absolute path on the geometry server to the 3d data files (.3di or .3dd).
几何服务器上到3d 数据文件(.3 di 或.3 dd)的相对或绝对路径。
char *attribute_serverInputThe name or IP address for the attribute/ annotation database server.
属性/注释数据库服务器的名称或 IP 地址。
char *attribute_directoryInputThe absolute path on the attribute serve to the .mdb database files.
属性上的绝对路径用于. mdb 数据库文件。
char *local_server_directoryInputThe absolute directory path for the location of the .amm files generated by the translator.
转换程序生成的. amm 文件位置的绝对目录路径。
char *local_geom_directoryInputThe absolute directory path for the location of the 3di and 3dd geometry data files.
3di 和3dd 几何数据文件位置的绝对目录路径。
char *local_web_directoryInputThe absolute directory path for the location of the am3 web files. This directory will probably be the same location that other HTML, TIF or VRML files are being written.
Am3 web 文件位置的绝对目录路径。这个目录可能与编写其他 HTML、 TIF 或 VRML 文件的位置相同。
doubletoleranceInputAdjustment to facet tolerance. Values larger than 1.0 produce fewer output facets. Values less than 1.0 increase the number of facets generated.
调整面公差。大于1.0的值产生的输出面更少。小于1.0的值会增加生成的方面的数量。
intmode_flagsInputBit field to control output contents. Flags are: UF_STD_ACTIVEWEB_CREATE_ATTR Controls creation of attribute database. UF_STD_ACTIVEWEB_ERASE_LOG Erases log files after successful optimization. UF_STD_ACTIVEWEB_MOVE_FILES Moves generated files to the output directories as specified by the local_server_directory, the local_geom_directory, and the local_web_directory. If the move flag is set and the directory spec for one of the local directories is blank, then that move will be ignored. UF_STD_ACTIVEWEB_RECURSIVE Apply translation to all components of an assembly. For component parts the base_name will be the part name. UF_STD_ACTIVEWEB_NO_OPTIMIZE Generates the polygon data (.3dx) file but does not invoke the optimizer to create any of the other files. This is useful if you desire to manually perform the optimization at another time.
控制输出内容的位字段。标志是: UF _ STD _ ACTIVEWEB _ CREATE _ ATTR 控制属性数据库的创建。UF _ STD _ ACTIVEWEB _ ERASE _ LOG 优化成功后删除日志文件。UF _ STD _ ACTIVEWEB _ MOVE _ FILES 将生成的文件移动到由 local _ server _ 目录、 local _ geom _ 目录和 local _ web _ 目录指定的输出目录。如果设置了 move 标志,并且其中一个本地目录的目录规范为空,那么这个 move 将被忽略。将转换应用于程序集的所有组件。对于组件部件,base _ name 将是部件名。UF _ STD _ ACTIVEWEB _ NO _ OPTIMIZE 生成多边形数据(.3 dx)文件,但不调用优化器来创建任何其他文件。如果您希望在另一个时间手动执行优化,这是非常有用的。