Results 1 to 1 of 1

Thread: Field expression in attribute shows ####

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2018-03
    Posts
    1
    Login to Give a bone
    0

    Default Field expression in attribute shows ####

    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.
    Attached Images Attached Images

Similar Threads

  1. 2015: How to customize field expression
    By Klaus.Hellweger732121 in forum AutoCAD Mechanical - General
    Replies: 4
    Last Post: 2018-07-06, 08:17 AM
  2. read field expression of an attribute
    By alberto.boffi695984 in forum AutoLISP
    Replies: 4
    Last Post: 2011-06-02, 07:29 AM
  3. Customizing field expression
    By amarkovi in forum Dynamic Blocks - Technical
    Replies: 5
    Last Post: 2009-03-31, 06:00 PM
  4. Field expression change
    By csiress in forum AutoCAD Fields
    Replies: 3
    Last Post: 2007-11-20, 06:37 PM
  5. Replies: 1
    Last Post: 2007-06-06, 05:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •