|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区
您需要 登录 才可以下载或查看,没有账号?立即注册
×
Mastercam X7已经可以达到如UG后处理一样直接取得电脑用户,而且其参数和使用方法特别简单,该功能只能适用于MastercamX7以后的版本,之前的版本没有这个函数。4 M5 F8 G* D3 s4 ~! z
下面给大家分享这个大家梦寐以求的功能及代码,使用方法。( m# [: w" o; {# t& w9 w A# r
1.首先定义一个用户变量(必须是字符串类型). z, p0 f' t4 T' _- m5 t
susername : "": P% c6 h6 I" x. ]8 e W* h
2.也是最关键的,同时也是X7新加入的一个功能性的参数。
2 T1 M" Q) R% \ susername = sysinfo(result, 3) W& o. E9 W4 M K$ p$ `1 W+ D
3.在需要输出的位置调用即可。
' s9 v' I" c7 D2 d7 |9 W, j; N2 j, p' @, [ _
下面是mastercamX7官方后处理新增加的变量使用说明:2 k$ ~1 k* I+ K0 u2 K( L
In X7, we have a new function to get this information.
( {. ^* Q2 G0 g# q# v7 h8 [/ S2 I+ n
str1 = sysinfo(*val1, val2)# r- s$ b4 n ^0 y
& g) ~7 O0 n2 H" u5 {! cval1 = return 0 on failure, 1 if success5 r( m( _! i3 ^, B; e
val2 = option for function (mode)* |4 z" b4 w! A9 Z* E% S
str1 = return string based on val2
& O5 t' Q! |( u& e" C" c8 A5 o1 DOption 0 = NameUnknown - An unknown name type, really% _' z, [* c' O
# V5 U/ B% U, L! X" e4 d# s. `Option 1 = NameFullyQualifiedDN - The fully-qualified distinguished name (for example, CN=Jeff Smith,OU=Users,DC=Engineering,DC=Microsoft,DC=Com)
/ k4 l% {: E9 ]5 r# O
* `1 E2 H6 F# r/ p6 c3 nOption 2 = NameSamCompatible - A legacy account name (for example, Engineering\JSmith). The domain-only version includes trailing backslashes (\\)
' c# w' k! b/ C4 N# B3 C$ ]: F9 b$ B2 y( ?
Option 3 = NameDisplay - A "friendly" display name (for example, Jeff Smith). The display name is not necessarily the defining relative distinguished name (RDN)5 R |3 Y5 I+ z
6 w8 a% ], _0 X
Option 4 = NameUniqueId - A GUID string that the IIDFromString function returns (for example, {4fa050f0-f561-11cf-bdd9-00aa003a77b6})" ]+ P5 Q- U2 W9 l& \1 ]9 o' s
* f: Z& r) s6 N, T; ROption 5 = NameCanonical - The complete canonical name (for example, engineering.microsoft.com/software/someone). The domain-only version includes a trailing forward slash (/)
8 I- l3 v3 K) `8 S( ?2 w# ~* y" s9 O) U
Option 6 = NameUserPrincipal - The user principal name (for example, someone@example.com)
: L3 {* F$ X! |/ J7 q6 Q) h
8 i* R) h8 t4 `$ 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)8 L' Y q1 M' P/ q
' q# P0 l1 D8 s5 T% g
Option 8 = NameServicePrincipal - The generalized service principal name (for example, www/www.microsoft.com@microsoft.com)$ W) E; Y2 D1 W ^- m3 V
5 g+ h. U1 q8 b% B8 {
Option 9 = NameDnsDomain - The DNS domain name followed by a backward-slash and the SAM user name |
|