I am trying to define x and y lengths (as field) based on 4 points. The lengths are displayed in block attributes. When i create block first time it works well. But when i insert
blockreference, i does not work. it shows XXXX. pls see screenshot attached. The attribute is only locked. other property are as it is. I have serched for so long.
But could not find proper solution.
This is field i want to use in attribute.
DistXunit = "%<\AcExpr (rxof((" & CStr(FourthPtX) & " - " & CStr(FirstPtX) & ")+(" & CStr(ThirdPtX) & " - " & CStr(SecondPtX) & "))/2) \f ""%lu6"">%"
Here i define a block with "Xdist" attribute and insert block. I can see field here.
'' Add Xdist attribute
Dim AttrX As AcadAttribute
Dim InsX(0 To 2) As Double
Set AttrX = BlockLable.AddAttribute(TextSz, acAttributeModeVerify, "X distance", InsX, "XDIST", DistXunit)
'' Insert the block, creating a block reference and an attribute reference
Dim blockRefLable As AcadBlockReference
Set blockRefLable = ThisDrawing.ModelSpace.InsertBlock(InsPtFinal, "NISH-ALABLE", 1#, 1#, 1#, Rangle)
Here i insert the same block and change "Xdist" attribute. And i see field ####.
'' Get the old attributes
Dim VarAttributes As Variant
VarAttributes = TempRef.GetAttributes
''change attribute value
VarAttributes(2).TextString = DistXunit
Any help is appreciated. Thanx.