|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Mastercam X7已经可以达到如UG后处理一样直接取得电脑用户,而且其参数和使用方法特别简单,该功能只能适用于MastercamX7以后的版本,之前的版本没有这个函数。
2 Z' s) }$ U& q* }下面给大家分享这个大家梦寐以求的功能及代码,使用方法。
5 y- ~* S- e% C2 G/ i1 P1 \1.首先定义一个用户变量(必须是字符串类型)
) l( N& V) n; Esusername : ""
( R0 G" u7 M3 [# L% O# g/ _1 I2.也是最关键的,同时也是X7新加入的一个功能性的参数。" _$ D3 A8 l/ ?+ v
susername = sysinfo(result, 3)0 {% C: q8 T, V. H0 m* z. _
3.在需要输出的位置调用即可。
" X# n. U. T, S6 L5 X
' X" h3 B9 v/ O7 y( P下面是mastercamX7官方后处理新增加的变量使用说明:, ~: x' s8 Q) x- Z( L+ d2 V
In X7, we have a new function to get this information.
9 m: I* q) \2 Q
3 m2 i, G1 ]9 T- ostr1 = sysinfo(*val1, val2)8 s- C8 ?' |6 _ C5 K
: a( r& F/ p; {5 ~6 A0 R/ `0 Tval1 = return 0 on failure, 1 if success2 o9 v! t2 T& R$ O4 k, h
val2 = option for function (mode)
) E7 M+ F/ G* Vstr1 = return string based on val2) J8 q" g: b/ h" b$ L+ q0 f
Option 0 = NameUnknown - An unknown name type, really. k S& P3 n* M" L; T# c* f
; N# D' l- u& B( Q. MOption 1 = NameFullyQualifiedDN - The fully-qualified distinguished name (for example, CN=Jeff Smith,OU=Users,DC=Engineering,DC=Microsoft,DC=Com)
: f1 V- M8 b$ } k1 D4 q( Q. o
* A7 v! }6 M( Y1 j& ], A( }: }Option 2 = NameSamCompatible - A legacy account name (for example, Engineering\JSmith). The domain-only version includes trailing backslashes (\\). c% G$ S( ~1 z9 x2 [
6 S9 S' @) y& V* [+ S$ H j/ z1 r
Option 3 = NameDisplay - A "friendly" display name (for example, Jeff Smith). The display name is not necessarily the defining relative distinguished name (RDN)
" q* E$ Y" \2 f) Z
; ]! s, U* s1 jOption 4 = NameUniqueId - A GUID string that the IIDFromString function returns (for example, {4fa050f0-f561-11cf-bdd9-00aa003a77b6})5 H* H7 ?& t: ~+ D
) ~3 L e0 k b0 F1 {1 m' h
Option 5 = NameCanonical - The complete canonical name (for example, engineering.microsoft.com/software/someone). The domain-only version includes a trailing forward slash (/)
6 H( D+ G( c" u0 m# C* ~ o! w- M) D( L; V
Option 6 = NameUserPrincipal - The user principal name (for example, someone@example.com)+ |# C! q r/ ?2 s: d5 X& V
' z& \. f7 b3 v; q9 J8 [3 \5 qOption 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)) i9 J3 J4 O6 d. Q8 h- y7 `7 V
( Y( q) T& n9 r5 M/ ~4 iOption 8 = NameServicePrincipal - The generalized service principal name (for example, www/www.microsoft.com@microsoft.com)- f4 X) E( C8 T! r& g3 R7 K
! V& I8 D. I. P" @, Q
Option 9 = NameDnsDomain - The DNS domain name followed by a backward-slash and the SAM user name |
|