找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1125|回复: 3

[求助] ARX 画失量图

[复制链接]
发表于 2013-8-24 19:47:18 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
大家好,我是新手,想问下,用CAD咋画失量图的呀。网上这方面的资料也太少了。有会的给俺讲讲吗?
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 13个

财富等级: 恭喜发财

发表于 2013-8-24 20:10:52 | 显示全部楼层
本帖最后由 LoveArx 于 2013-8-24 20:12 编辑

你是说画那种向量,刷新后就没的那种?

ARX有全局函数:
acedGrDraw Global Function
int
acedGrDraw(
const ads_point from,
const ads_point to,
int color,
int hl);
fromBeginning point of the vector, expressed in the current UCS; can be a three-dimensional point
toEnd point of the vector, expressed in the current UCS; can be a three-dimensional point
colorVector's AutoCAD color number (in the range 0-255); I -1, the vector is drawn in XOR ink, which complements anything it draws over and erases itself when overdrawn
hlIf nonzero, the vector is highlighted; if zero, the vector is drawn in normal display mode
Draws a vector between two points in the current viewport.
AutoCAD clips the vector as required to fit the screen.
Highlighting, controlled by the hl argument, depends on the display device. Most display drivers indicate highlighting by a dashed line, but some indicate it by using a distinctive color.
Unless a critical error occurs, acedGrDraw() returns RTNORM.
Include Fileacedads.h

acedGrVecs Global Function
int
acedGrVecs(
const struct resbuf * vlist,
ads_matrix mat);
vlistList of result buffers that specify the vectors to draw
mat4 x 4 transformation matrix that acedGrVecs() applies to the vectors before displaying them; if NULL, defaults to the identity matrix
Draws multiple vectors on the graphics screen.
Result-buffer elements in the vlist can be as follows:
  • A pair of points (RTPOINT or RT3DPOINT) that specify the endpoints of the vector, expressed in the current UCS; these can be three-dimensional points.
    Note You must pass these points as pairs--that is, in two successive result buffers--or the acedGrVecs() call will fail.
  • A color value that applies to all succeeding vectors until vlist specifies another color. The color is specified as a short integer (RTSHORT). AutoCAD colors are in the range 0-255. If the color value is greater than 255, succeeding vectors are drawn in XOR ink, which complements anything it draws over and erases itself when overdrawn. If the color value is less than 0, the vector is highlighted.
AutoCAD clips the vectors as required to fit the screen.
The mat argument is useful in conjunction with acedDragGen() when you want to display vectors that are transformed with the selection set.
If it succeeds, acedGrVecs() returns RTNORM; it returns RTERROR if it encounters a result buffer of the wrong type or if the points in vlist are not paired correctly.
Include Fileacedads.h


acedGrText Global Function
extern "C" int
acedGrText(
int box,
const ACHAR * text,
int hl);
boxGraphics screen area in which to display the text
textText string to display
hlControls highlighting of menu items
Displays the specified text in the menu, mode, or status area of the graphics screen.
If box equals the number of a screen menu box and hl is less than 0, acedGrText() displays text in that box. The menu boxes are numbered beginning at 0. If the value of box is greater than the number of menu boxes minus one, the call to acedGrText() usually has no effect.
If box specifies a screen menu box and hl is greater than 0, the text displayed by acedGrText() is highlighted. If hl equals 0 and the box is highlighted, acedGrText() turns highlighting off. (Remember that AutoCAD allows only one menu box to be highlighted at a time. A call that highlights a different box automatically turns off any previous highlighting.) When hl is greater than or equal to 0, the text argument is ignored.
If box equals -1, acedGrText() writes the text into the mode status line (the hl argument is ignored). The length of the mode status line differs from display to display; most allow at least 40 characters. If text contains more characters than the mode status line allows, it is truncated; if it contains fewer characters, it is padded with blanks.
If box equals -2, acedGrText() writes the text into the coordinate status line (the hl argument is ignored). If coordinate tracking is turned on, any value written into this field is overwritten as soon as the pointer sends another set of coordinates.
Finally, if box is less than -2 (for example: box equals -5), acedGrText() restores all the text areas on the screen to their standard values.
If it succeeds, acedGrText() returns RTNORM. It returns RTERROR if the box number is out of range.
Include Fileacedads.h


acedGrRead Global Function
int
acedGrRead(
int track,
int * type,
struct resbuf * result);
trackControl bits that affect the behavior of acedGrRead(); not mutually exclusive, so to set multiple conditions add the values together
typeDevice and kind of input entered; used to control the cursor display
resultValue obtained from the user
Input devices directly read the next input that the user provides to any AutoCAD input device.
Note Only specialized ARX applications need this function. The various user input functions (acedGetXxx(), acedEntSel(), acedNEntSelP(), acedNEntSel(), and acedDragGen()) are sufficient for almost all purposes.
The following list describes the control bits.

论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-8-24 20:38:43 | 显示全部楼层
对呀!:loveliness:
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-9-24 12:28 , Processed in 0.298212 second(s), 31 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表