Author Topic: Confusing with DXF Group Code  (Read 4076 times)

0 Members and 1 Guest are viewing this topic.

MeasureUp

  • Bull Frog
  • Posts: 462
Confusing with DXF Group Code
« on: December 06, 2010, 10:55:19 PM »
How to modify an individual dimension object?
For example, I know I can change the "dimaunit" value by selecting a dimension & using the "dimoverride".
But I can't find the "dimaunit" value when selecting the dimension object picked.

The only onething found from the HELP in "HEADER Section Group Codes" (HEADER section) is:
Quote
$DIMAUNIT
Group Code = 70

Angle format for angular dimensions:
0 = Decimal degrees;
1 = Degrees/minutes/seconds;
2 = Gradians; 3 = Radians;
4 = Surveyor's units

But there is another group code of "70" with different meaning in "Common Dimension Group Codes" in ENTITIES section.

Thanks in advance.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Confusing with DXF Group Code
« Reply #1 on: December 06, 2010, 11:18:39 PM »
Try: vla-get-AngleFormat

Code: [Select]
(defun c:test(/ ent obj)
  (vl-load-com)
  (and (setq ent (car (entsel "\nPick a dimension for angle format.")))
       (setq obj (vlax-ename->vla-object ent))
       (or (vlax-property-available-p obj 'AngleFormat)
           (prompt "\nThis is not a angle dimension."))
       (princ "\nThe angle Format is ")
       (princ (vla-get-AngleFormat obj))
   )
  (princ)
)
« Last Edit: December 06, 2010, 11:25:40 PM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

MeasureUp

  • Bull Frog
  • Posts: 462
Re: Confusing with DXF Group Code
« Reply #2 on: December 07, 2010, 12:37:58 AM »
Try: vla-get-AngleFormat

Code: [Select]
(defun c:test(/ ent obj)
  (vl-load-com)
  (and (setq ent (car (entsel "\nPick a dimension for angle format.")))
       (setq obj (vlax-ename->vla-object ent))
       (or (vlax-property-available-p obj 'AngleFormat)
           (prompt "\nThis is not a angle dimension."))
       (princ "\nThe angle Format is ")
       (princ (vla-get-AngleFormat obj))
   )
  (princ)
)
It works. Thanks CAB.
More questions,
1) there is no way to get it by using DXF code directly, is this right?
2) And where to get the entire vla- functions reference? (It is not found in the HELP).

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Confusing with DXF Group Code
« Reply #3 on: December 07, 2010, 05:01:30 AM »
Dim overrides are stored in extended entity data:
Code: [Select]
(entget (car (entsel)) '("*"))You probably can change them "directly", but it won't be very easy.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Confusing with DXF Group Code
« Reply #4 on: December 07, 2010, 06:13:11 AM »
Dim overrides are stored in extended entity data:
Code: [Select]
(entget (car (entsel)) '("*"))You probably can change them "directly", but it won't be very easy.

The attached may help in that respect.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Confusing with DXF Group Code
« Reply #5 on: December 07, 2010, 08:16:28 AM »
I should have realized where this was going. 8-)
http://www.theswamp.org/index.php?topic=3313.msg40725#msg40725
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Confusing with DXF Group Code
« Reply #6 on: December 07, 2010, 08:28:55 AM »
Here is a very old lisp that looks at the dimension xdata:
Code: [Select]
;;;               DimPrec.lsp                  
;;;    By Charles Alan Butler  04/27/2003
;;; This routine will flag all dims that have dimension text
;;; over ridden or have a precision greater less than 1/32 .
;;; One or more of the following symbols are placed over the dimension
;;;
;;; Symbols
;;;  CHECK    = Dimensions that have a precision >= 1/32
;;;  S        = Dimensions that are STYLE dependent for precision
;;;  Circle/  = Dimensions with precision less than 1/32 (0.00000)
;;;  SquareX  = Dimensions that have Text Overrides
;;;  Diamond+ = Dimensions that are rounded off & precision is ok
;;;
;;; The symbols used are placed on Layer "DefPoints"
;;; and sized according to DIMTXT size variable,
;;; or the Text Style of the DIM if it's size > 0
;;;
;;;  Limitations :  
;;;       not designed to work in paper space.
;;;       USCS World plan view only
;;;
;;;  Revision 04/12/04
;;;   Correction for ACAD2000, blocks are created on layer 0 now
;;;   Dims selected are visible in space you are working
;;;     not All dims & frozen as before
;;;   Streamlined code
;;;
;;;  Revision 12/17/05
;;;   Added the Rounded Off flagging of dimensions that are within
;;;   the precision of the style

http://www.theswamp.org/index.php?topic=8098.0

Removed code and added link...
« Last Edit: December 07, 2010, 08:49:04 AM by CAB »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Confusing with DXF Group Code
« Reply #7 on: December 07, 2010, 08:40:49 AM »
This another in this thread.  http://www.theswamp.org/index.php?topic=24561.0

Haven't located any great examples yet.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Confusing with DXF Group Code
« Reply #8 on: December 07, 2010, 08:52:47 AM »
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.