乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 93|回复: 13

[编程交流] Maybe I'm asking the wron

[复制链接]

88

主题

346

帖子

281

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
423
发表于 2022-7-6 11:23:36 | 显示全部楼层 |阅读模式
re: DIMASZ
 
Change it at the command prompt and it makes a global change.

You can change it for the selected entities via the Properties dialog.

 
How do you  change the dimasz of a single entity?
 
I've been digging around in here and it's not evident to me..

 
HELP??
回复

使用道具 举报

88

主题

346

帖子

281

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
423
发表于 2022-7-6 11:29:34 | 显示全部楼层
I've finally found it in the Extended Entity Data.
 
 
Command: !a
  1. ((-1 . ) (0 . "DIMENSION") (5 . "185") (102 . "{ACAD_XDICTIONARY") (360 . ) (102 . "}") (102 . "{ACAD_REACTORS") (330 . ) (102 . "}") (330 . ) (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (100 . "AcDbDimension") (2 . "*D2") (10 3.76647 4.90871 0.0) (11 5.39181 3.3427 0.0) (12 0.0 0.0 0.0) (70 . 102) (1 . "") (71 . 5) (72 . 1) (41 . 1.0) (42 . 1.62534) (73 . 0) (74 . 0) (75 . 0) (52 . 0.0) (53 . 0.0) (54 . 0.0) (51 . 0.0) (210 0.0 0.0 1.0) (3 . "Standard") (100 . "AcDbOrdinateDimension") (13 5.39181 4.90871 0.0) (14 5.39181 3.79786 0.0) (15 0.0 0.0 0.0) (16 0.0 0.0 0.0) (40 . 0.0) (50 . 0.0) (-3 ("ACAD" (1000 . "DSTYLE") (1002 . "{") (1070 . 41) [b](1040 . 0.0777)[/b] (1002 . "}"))))
 
 
I do not know how to isolate this one item to even begin to try to change it.
 
How do I isolate (Assoc 1040 a) ??
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 11:35:29 | 显示全部楼层
 
 
Correct.
You could easily entmod it from there.
回复

使用道具 举报

4

主题

940

帖子

961

银币

初来乍到

Rank: 1

铜币
12
发表于 2022-7-6 11:39:48 | 显示全部楼层
I may be wrong but I don't think you can change the arrowhead size of a single arrowhead in an associated dimension. If you want to change the size of both arrowheads you can use this.
  1. (vlax-put-property obj 'Arrowheadsize [color=Red][i]newsize[/i][/color])
回复

使用道具 举报

88

主题

346

帖子

281

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
423
发表于 2022-7-6 11:45:59 | 显示全部楼层
I am in water way over my head here...
I just realized that (Assoc 1040) only shows up IF the DIMASZ
has been changed from the default.
I have no idea how to get the entity list if it has not been changed...
 
In my above example: (Assoc 1040 a) returns nil
I cannot "get" anything after this in the entity list..
 
  1. (-3 ("ACAD" (1000 . "DSTYLE")
 
 
ps: Sorry for not being clear..., I'm not trying to change one arrow head...
I'm actually wanting to change the DIMASZ of an Ordinate Dimension.
回复

使用道具 举报

88

主题

346

帖子

281

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
423
发表于 2022-7-6 11:46:45 | 显示全部楼层
This thread actually relates to something I'm wanting to do
(from another thread..)
 
http://www.cadtutor.net/forum/showthread.php?t=46652
 
I'm way out my league even attempting to do this in VL...
I was trying to modify some existing code but had no idea how to do it..
 
I can't even do this in vanilla autolisp so I'm really begging for assistance...
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 11:51:32 | 显示全部楼层
I was thinking that too, but I read the following for Dimasz (per SysvDlg):
回复

使用道具 举报

4

主题

940

帖子

961

银币

初来乍到

Rank: 1

铜币
12
发表于 2022-7-6 11:57:45 | 显示全部楼层
I see this was sorted in a different thread
回复

使用道具 举报

54

主题

3755

帖子

3583

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
438
发表于 2022-7-6 12:02:34 | 显示全部楼层
 
Decided it was best to post in the original thread. I must have missed it the first time around.
回复

使用道具 举报

114

主题

1万

帖子

1万

银币

中流砥柱

Rank: 25

铜币
543
发表于 2022-7-6 12:06:30 | 显示全部楼层
Dimension overrides through AutoLISP are handled in Extended Data (XData), under the ACAD appname, here is some useful info if you want to approach it that way:
 
  1. Art Cooney (artc@autodesk.com)There's a description of the codes in the ObjectARX documentation (I've includedit below).  I don't think the DXF documentation explains the overrides.Here's the description from the ObjectARX docs:Dimension style overrides can be applied to any of the AcDbEntity types thatreference an AcDbDimStyleTableRecord.  These are:AcDbAlignedDimensionAcDbRotatedDimensionAcDbDiametricDimensionAcDbRadialDimensionAcDb2LineAngularDimensionAcDb3PointAngularDimensionAcDbOrdinateDimensionAcDbLeaderAcDbFcfDimension overrides applied to an object of any of these classes are stored asxdata under the "ACAD" appId in a special subsection. The subsection starts witha group code 1000 (AcDb::kDxfXdAsciiString) with the string "DSTYLE", followedby all the dimension override data bracketed inside a pair of group code 1002's(AcDb::kDxfXdControlString) (the first being a "{" and the other a "}").Dimension variables in general are called dimvars, and this data is commonlycalled "per-entity dimvar overrides" or just dimvar overrides.Within the group code 1002 brackets is a chain of dimvar group-code/data-valueresbuf pairs, one pair for each dimvar being overridden.The first resbuf in each pair is the DXF group code for the dimvar, as found inthe Table below.  Since the group code is an integer it has a restype ofAcDb::kDxfXdInteger16 (group code 1070).The second resbuf in each pair is the value for that dimvar.  Data values fordimvars may be strings, integers, reals, or objectIds.  As with resbufs ingeneral, the value of the resbuf’s restype indicates how to read the data in theresval.  Please refer to the Table below.As an example, here is a dimension style override list that will override theDIMTAD and DIMGAP variables. The list is shown in AutoLISP format with indentingfor clarity.("ACAD"   (1000 . "DSTYLE")   (1002 . "{")   (1070 . 77) (1070 . 1)   (1070 . 147) (1000 .  0.2)   (1002 . "}"))In this example the group code 77 is DIMTAD, which is overridden to be 1. ThenDIMGAP (group code 147) is set to 0.2.The following code sample uses acutBuildList() to create this resbuf chain andto set overrides for DIMTAD and DIMGAP on the entity pointed to by pEnt,assuming pEnt points to an AcDbEntity of one of the types listed above and isopen for writing:resbuf* pRb = acutBuildList(       AcDb::kDxfRegAppName,      "ACAD",       AcDb::kDxfXdAsciiString,   "DSTYLE",       AcDb::kDxfXdControlString, "{",       AcDb::kDxfXdInteger16,  77, AcDb::kDxfXdInteger16, 1,       AcDb::kDxfXdInteger16, 147, AcDb::kDxfXdReal,      0.2,       AcDb::kDxfXdControlString, "}",       RTNONE);Acad::ErrorStatus es = pEnt->setXdata(pRb);acutRelRb(pRb);It is very important the xdata you set onto an object have the proper sequenceof resbufs.  Each override must have both the DXF group code resbuf and theassociated value resbuf. In addition, the value must be the correct data type(string, real, or int) and must be within the allowable range for that dimvar.If any of these conditions are not met, AutoCAD may terminate. Also, the 1000"DSTYLE" and the following 1002 "{" "}" set must be present, and there must onlybe one set of all of these.Remember that xdata is obtained and replaced on a per-appId basis. To modify anydimension overrides, work with the complete list of xdata for the "ACAD" appId,which may have other data, including other dimension overrides. So, be sure toobtain whatever xdata may already be present for the "ACAD" appId (use theobject's xData() method with the string "ACAD"). Add or remove only thedimension override information you need, making sure that if dimension overrideinformation already exists you don't duplicate any of the xdata that's alreadythere (including the "DSTYLE" string and the 1002 "{" "}" bracket pairs). Placenew overrides in between the existing 1002 bracket pair, and put the completemodified list back into the object via the object's setXData() method. If notdone correctly, AutoCAD may terminate.Here is a table of all the DimStyleTableRecord dimvars, with their DXF groupcodes, data types, and value ranges:Group code  Dimension variable     Data type     Value range3           DIMPOST                string        any4           DIMAPOST               string        any40          DIMSCALE               real          >= 0.041          DIMASZ                 real          >= 0.042          DIMEXO                 real          >= 0.043          DIMDLI                 real          >= 0.044          DIMEXE                 real          >= 0.045          DIMRND                 real          >= 0.046          DIMDLE                 real          >= 0.047          DIMTP                  real          >= 0.048          DIMTM                  real          >= 0.071          DIMTOL                 int           0 = off,  1 = on72          DIMLIM                 int           0 = off,  1 = on73          DIMTIH                 int           0 = off,  1 = on74          DIMTOH                 int           0 = off,  1 = on75          DIMSE1                 int           0 = off,  1 = on76          DIMSE2                 int           0 = off,  1 = on77          DIMTAD                 int           0 - 378          DIMZIN                 int           0 - 1579          DIMAZIN                int           0 - 15            new140         DIMTXT                 real          >= 0.0141         DIMCEN                 real          any value142         DIMTSZ                 real          >= 0.0143         DIMALTF                real          >= 0.0144         DIMLFAC                real          >= 0.0145         DIMTVP                 real          >= 0.0146         DIMTFAC                real          >= 0.0147         DIMGAP                 real          any value148         DIMALTRND              real          >= 0.0           new170         DIMALT                 int           0 = off,  1 = on171         DIMALTD                int           >= 0172         DIMTOFL                int           0 = off,  1 = on173         DIMSAH                 int           0 = off,  1 = on174         DIMTIX                 int           0 = off,  1 = on175         DIMSOXD                int           0 = off,  1 = on176         DIMCLRD                int           0 - 256177         DIMCLRE                int           0 - 256178         DIMCLRT                int           0 - 256179         DIMADEC                int           0 - 8            new271         DIMDEC                 int           0 - 8272         DIMTDEC                int           0 - 8273         DIMALTU                int           1 - 8274         DIMALTTD               int           0 - 8275         DIMAUNIT               int           0 - 4276         DIMFRAC                int           0 - 2            new277         DIMLUNIT               int           0 - 4            new278         DIMDSEP                int           (char) any char  new279         DIMATMOVE              int           0 - 2            new280         DIMJUST                int           0 - 4281         DIMSD1                 int           0 = off,  1 = on282         DIMSD2                 int           0 = off,  1 = on283         DIMTOLJ                int           0 - 2284         DIMTZIN                int           0 - 15285         DIMALTZ                int           0 - 15286         DIMALTTZ               int           0 - 15288         DIMUPT                 int           0 = off,  1 = on289         DIMATFIT               int           0 - 3            new340         DIMTXSTY               objectId                       new341         DIMLDRBLK              objectId                       new342         DIMBLK                 objectId                       new343         DIMBLK1                objectId                       new344         DIMBLK2                objectId                       new371         DIMLWD                 int           lineweights      new372         DIMLWE                 int           lineweights      new
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-6 02:58 , Processed in 0.328871 second(s), 72 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表