usrmain.c

来自「proe5.0野火版下载(中文版免费下载)」· C语言 代码 · 共 63 行

C
63
字号
/* Template for writing user programs in the Pro/ENGINEER environment  *//* the following definition and include file are necessary */#define   USRMAIN#include  "spgusrgl.h"/* This include file establishes useful variables for user needs. Those are:1. D[i] refers to dimensions you see on the screen. 'i' is the index of a   dimension you see on the screen.   So, D[0] has a value corresponding to "d0" on the screen (or "sd0" if you   are in SKETCHER mode). D[4] corresponds to "d4" (or "sd4") on the screen, etc.2. DIM_NUM  Total number of dimensions on the screen.3. DIM_SIGN_MODE - this is an integer.   User program can assign it values: DIM_SIGN_MODE_TRUE and    DIM_SIGN_MODE_RELATIVE.   This variable controls the way how negative values are assigned to dimensions   Having it = DIM_SIGN_MODE_TRUE establishes "true value assignment",   DIM_SIGN_MODE_RELATIVE - "relative value assignment".   For example, if old value of d1 = -5.0 and usrmain() contains   DIM_SIGN_MODE = DIM_SIGN_MODE_TRUE;   D[1] = -10.0;   then d1 will be assigned new value = -10.0 ( true value assignment ).   If user program contains      DIM_SIGN_MODE = DIM_SIGN_MODE_RELATIVE;   D[1] = -10.0;      d1 will be assigned new value = +10.0 ( relative value assignment ).   Relative value mode determines sign of the result as a multiplication   of previous sign by the sign of incoming value.   DIM_SIGN_MODE has default value = DIM_SIGN_MODE_RELATIVE.   User can change DIM_SIGN_MODE several times in a program,   but only the last value will be used.*/      usrmain(){/* --- local variables--------------------------------- *//* Declare any additional variables or functions you need here. */double sqrt ();/* --- executable code -------------------------------- *//*    Example - establish the relation 1/10 between the first two dimensions:   D[1] = 10 * D[0];                                                      */}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?