|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Mastercam X7已经可以达到如UG后处理一样直接取得电脑用户,而且其参数和使用方法特别简单,下面给大家分享这个大家梦寐以求的功能及代码,使用方法。
& @7 {! v( [! r( Y' a6 _) m# a& S1.首先定义一个用户变量(必须是字符串类型)0 W% r: i- s4 |4 |
susername : ""5 d: u2 G1 H) y4 }/ g
2.也是最关键的,同时也是X7新加入的一个功能性的参数。0 Q2 I$ q3 g" D' T9 a
susername = sysinfo(result, 3)1 U! f7 k+ Q9 B
3.在需要输出的位置调用即可。
: k# e6 K/ R) ~$ k/ N5 R) y1 v5 ~( m, s$ e7 L
下面是mastercamX7官方后处理新增加的变量使用说明:9 \0 ?; W V9 ^1 c/ F5 _
In X7, we have a new function to get this information.
( F# R2 A! z7 h* O
7 ~; b; f& ]: c& d5 t2 I/ [4 bstr1 = sysinfo(*val1, val2): V8 U, k1 a4 l' p
5 }. ]. n. n6 s3 Zval1 = return 0 on failure, 1 if success
( O8 q3 W$ t0 h/ [ o sval2 = option for function (mode)
* q& L7 _( Z9 Y. U7 H3 Y+ Bstr1 = return string based on val25 W5 C, V V5 x
Option 0 = NameUnknown - An unknown name type, really( C% T7 z- K2 r; e/ s
$ R; F8 Z/ s! m8 V* i, d9 }
Option 1 = NameFullyQualifiedDN - The fully-qualified distinguished name (for example, CN=Jeff Smith,OU=Users,DC=Engineering,DC=Microsoft,DC=Com): o3 w# y4 g' N+ d
; \ w4 B* K+ m$ A* fOption 2 = NameSamCompatible - A legacy account name (for example, Engineering\JSmith). The domain-only version includes trailing backslashes (\\)9 H8 e; I" Z9 b( \. }
8 J. c4 E1 D* B1 F
Option 3 = NameDisplay - A "friendly" display name (for example, Jeff Smith). The display name is not necessarily the defining relative distinguished name (RDN)' f, j. u& E9 t' }+ y: K6 m
' _4 [9 \, x' LOption 4 = NameUniqueId - A GUID string that the IIDFromString function returns (for example, {4fa050f0-f561-11cf-bdd9-00aa003a77b6})
/ V7 F3 I8 v# H1 x7 x+ R1 v$ r; Z3 w: p$ a- O$ P
Option 5 = NameCanonical - The complete canonical name (for example, engineering.microsoft.com/software/someone). The domain-only version includes a trailing forward slash (/)
( f) U) Z/ _& a5 N2 L" n
1 k8 f3 h5 {8 L; \! O& V6 p2 ]Option 6 = NameUserPrincipal - The user principal name (for example, someone@example.com)
7 @! r& \! o" o8 g* g i( f2 A% T5 E7 P7 K' [7 W
Option 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% c! F' ~ H4 j; I( I0 J7 M) z: @7 A: T- d/ H. V# p
Option 8 = NameServicePrincipal - The generalized service principal name (for example, www/www.microsoft.com@microsoft.com)& @ v0 K' ~% E! x
7 V7 n4 f& P0 ~6 J3 @
Option 9 = NameDnsDomain - The DNS domain name followed by a backward-slash and the SAM user name |
|