VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remove text (measurement) from dimension

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
pipu123
719 Views, 2 Replies

Remove text (measurement) from dimension

I would like to create textprefix "aa" and remove measurement (numbers indicating length )

How to remove this measurement ?

Set wymiartyprot01 = ThisDrawing.ModelSpace.AddDimRotated(pkta01ScPgSr, pktaOsHorPSrg01,pkta01ScPgz, k90Deg)
    wymiartyprot01.TextPrefix = "aa"


2 REPLIES 2
Message 2 of 3
Alfred.NESWADBA
in reply to: pipu123

Hi,

 

does that work for you?

Public Sub test()
   Dim tDimObj As AcadDimension
   Dim tPnt1(2) As Double: tPnt1(0) = 1: tPnt1(1) = 1: tPnt1(2) = 0
   Dim tPnt2(2) As Double: tPnt2(0) = 5: tPnt2(1) = 1: tPnt2(2) = 0
   Dim tPnt3(2) As Double: tPnt3(0) = 3: tPnt3(1) = 2: tPnt1(2) = 0
   
   Set tDimObj = ThisDrawing.ModelSpace.AddDimRotated(tPnt1, tPnt2, tPnt3, 0)
   tDimObj.TextOverride = "aa"
End Sub

 

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)
Message 3 of 3
pipu123
in reply to: Alfred.NESWADBA

Thank You it works .

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost