|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Mastercam X7已经可以达到如UG后处理一样直接取得电脑用户,而且其参数和使用方法特别简单,该功能只能适用于MastercamX7以后的版本,之前的版本没有这个函数。$ ?- }% D6 t" G# ?. G
下面给大家分享这个大家梦寐以求的功能及代码,使用方法。
& L% v' P& @1 d% B: M' x! J1.首先定义一个用户变量(必须是字符串类型)
9 G. s0 d) ^3 i6 f! S: U8 x0 N( C- ~susername : ""& f# r/ L) Z7 m: o1 {/ l" z
2.也是最关键的,同时也是X7新加入的一个功能性的参数。
5 H1 _2 W& R6 M. {, t X susername = sysinfo(result, 3)
1 s, _. P6 d8 V y; D$ P0 R3.在需要输出的位置调用即可。
" Z. T' l6 ^0 @* l# @
5 W3 a0 U; v9 Y' V! w8 V下面是mastercamX7官方后处理新增加的变量使用说明:
$ n5 c* A$ ]" u3 I: b) w; |In X7, we have a new function to get this information.' e5 ^2 W. r0 J8 |3 a- H
; I8 O; g/ n) o# [str1 = sysinfo(*val1, val2)# k- }" ^2 |( R" J" N0 w
9 T- w1 H3 P9 c- F0 X; _
val1 = return 0 on failure, 1 if success
E, x- T+ W7 F3 @8 ^val2 = option for function (mode)# R: f" M6 L) v
str1 = return string based on val2
# p6 ?7 q1 G+ Q/ B% E6 t9 q8 h# jOption 0 = NameUnknown - An unknown name type, really
' l& d1 i7 J+ n( a- N
3 b4 h7 z& a7 W2 L7 v' wOption 1 = NameFullyQualifiedDN - The fully-qualified distinguished name (for example, CN=Jeff Smith,OU=Users,DC=Engineering,DC=Microsoft,DC=Com)( i1 s# V( r5 W! Q$ [! ?- @. s
! i$ \: }3 w. ]7 OOption 2 = NameSamCompatible - A legacy account name (for example, Engineering\JSmith). The domain-only version includes trailing backslashes (\\)* v, T/ W- @$ L7 H t9 f
1 {7 z) z$ w7 F" e* Z& VOption 3 = NameDisplay - A "friendly" display name (for example, Jeff Smith). The display name is not necessarily the defining relative distinguished name (RDN)% x& h$ W' e7 Z) T$ v }
% k# b: o8 {+ Q7 YOption 4 = NameUniqueId - A GUID string that the IIDFromString function returns (for example, {4fa050f0-f561-11cf-bdd9-00aa003a77b6})
: U, k; \9 I) J$ x7 E
9 d: v/ H' \( V1 U! r; J" |' }Option 5 = NameCanonical - The complete canonical name (for example, engineering.microsoft.com/software/someone). The domain-only version includes a trailing forward slash (/)6 j3 L q5 W1 y1 l$ v
! N6 Z! V5 L4 R. @( V4 \' q
Option 6 = NameUserPrincipal - The user principal name (for example, someone@example.com)
w* p- U: b/ U6 r( [0 M
; p8 _) f$ j& j# W! ^$ vOption 7 = NameCanonicalEx - The same as NameCanonical except that the rightmost forward slash (/) is replaced with a new line character (\n), even in a domain-only case (for example, engineering.microsoft.com/software\nJSmith)# ?; l! e$ y/ K
d0 d( f2 L- s6 Q1 A$ s3 c
Option 8 = NameServicePrincipal - The generalized service principal name (for example, www/www.microsoft.com@microsoft.com)
% P6 j! V. X1 e, l
7 k4 H% z5 _% ^Option 9 = NameDnsDomain - The DNS domain name followed by a backward-slash and the SAM user name |
|