progeCAD support, tips and troubleshooting forum. progeCAD works very similar to some versions of AutoCAD. Moderated.

Moderators: caddit, Moderators

#2205 by thomasullmann
Sun Dec 28, 2014 12:00 pm
is it possible to Change (not only read) the TextInside property of a Dimension?

Sub bem_mitte_ein_aus()
Dim MyDok As IntelliCAD.Document
Dim DimObj As Object
Dim BasicPkt As IntelliCAD.Point

On Error Resume Next
Set MyDok = Application.ActiveDocument
MyDok.Utility.GetEntity DimObj, BasicPkt, vbCr & "choose dimension"
If Err <> 0 Then 'wenn nichts ausgewählt wurde dann ende
MsgBox "nothing choosed, Program-End."
Exit Sub
End If
If DimObj.EntityName <> "DimRotated" Then 'wenn keine bemaßung gewählt wurde dann ende
MsgBox "no dimension choosed, Program-End."
Exit Sub
End If
On Error GoTo 0

'#### the following is working
MsgBox DimObj.TextInside

'### this doesnt work
DimObj.TextInside = Not (DimObj.TextInside)
' ### the error is
' run-time-error 2147417848 (80010108)
' method 'TextInside' of object 'IIcadDimRotated' failed
End Sub