- 积分
- 6727
- 回帖
- 0
- 西莫币
-
- 贡献
-
- 威望
-
- 存款
-
- 阅读权限
- 65
- 最后登录
- 1970-1-1
该用户从未签到
|
发表于 2009-2-16 15:44
|
显示全部楼层
来自: 中国上海
你这个问题只能通过脚本实现,也就是你要将你要采样的直线离散成很多点,然后你采样各点场量即可。具体说明如下:
Field values in a shaded or arrow plot can be probed through a script. You can copy and paste the sample script below to a text file and then edit the script as necessary to suit your model.
The sample script gets the |B| field value at point (0,0,0). The field value is written to a message box that is displayed in the MagNet main window and is also written to a text file called FieldProbing.txt located in the folder C:\temp.
The lines beginning with an apostrophe (') and displayed in blue are comments to the script.
Sample script
'The |B| field for Problem ID 1 is loaded into memory. The Field ID is returned
?infoScalarField).
fieldId= getDocument().loadMagnetostaticField(1, "|B|", fieldType)
'The scalar field value at the specified point is returned.
CALL getDocument().getScalarFieldAtPoint(fieldId, 0, 0, 0, value)
'The field value is appended to the specified message.
Message= "The scalar field value of |B| at (0, 0, 0) is " & value
'A message box containing the message is displayed.
MsgBox(Message)
'The contents of the message box are written to the specified file.
CALL writeTextFile("c:\temp\FieldProbing.txt", Message)
'If the Field ID is greater than 0, the script continues and the memory used by the field is freed. If the Field ID is less than 0, the value was not obtained (so unloading is not necessary).
If (fieldId > 0) Then
getDocument().unloadField(fieldId)
End If
?Copyright 2002, Infolytica Corporation
有啥问题再讨论。 |
评分
-
查看全部评分
|