I want to take out the starting point and ending point of the length dimension in the VBA of IJCAD

Asked 2 months ago, Updated 2 months ago, 6 views

I'm working on VBA of IJCAD 2017.
I would like to ask you about the length dimension (GcadDimRotated).

After selecting the length dimensions on the drawing in IJCAD, I would like to know the starting point and ending point (coordinate values) of the dimensions, but no matter how much I looked up the GcadDimRotate and GcadDimension classes in Help, I couldn't find any properties.

The parallel dimension (GcadIimAligned) class has ExtLine1Point and ExtLine2Point properties, which are easy to retrieve here.

If you know how to know the starting point and ending point, please let me know.

vba ijcad

2022-09-30 14:04

2 Answers

Unfortunately, IJCAD's VBA cannot get the start and end points of GcadDimRotate.I can't get it with AutoCAD's AcadDimRotate, so I can only say the specification.

The workaround might be to proceed with development on VB.Net or GRX instead of VBA, create modules with .Net API or GRX and call them from VBA, or to find the starting point from the line obtained by temporarily breaking down the length dimensions (Explode).

2022-09-30 14:04

I think it is strange that the rotational dimension object does not have the ExtLine1Point and ExtLine2Point properties.

Coordinate values for starting and ending rotational dimensions can be obtained from 13 and 14 of the graphic list.


Prepare a function to string coordinate values

  (strcat(rtos(carp))", "(rtos(cadrp))", "(rtos(caddrp)))))))

Save the stringed coordinate values in the system variable USERS1

 (setvar "USERS1" (ptos(cdr(assoc13el)))))

You can also retrieve it from the VBA.

Dim text As String

You can also pass coordinate values between LISP and VBA by providing extended data or XRECORD in the drawing.

2022-09-30 14:04

If you have any answers or tips

© 2022 OneMinuteCode. All rights reserved.