How to display Object Attributes in 2D Viewport

Home Forums Problems and solutions in GDL Object design How to display Object Attributes in 2D Viewport

This topic contains 1 reply, has 2 voices, and was last updated by  Bruce Walker 2 weeks, 1 day ago.

  • Author
    Posts
  • #4766

    Roman Gorshkov
    Participant

    Hi guys,
    I am straggling to make custom 2D object. I want an object to hold 3 data field and be able to show them in viewport. Like label.

    1. How to make 2D object look like level marker?
    2. How to display its attributes in 2D viewport?

    Images attached. Thank you in advance!

  • #4777

    Bruce Walker
    Participant

    Roman,

    You would create this as a Label subtype, as labels can be attached to objects.

    You create your ‘target’ using LINE2, CIRCLE2, and POLY2, as you would any 2D object.
    You create your text items using the TEXT2 command (or RICHTEXT2 – but from what you’ve shown, multiple TEXT2 lines should be enough).
    You get your data items using the REQUEST command, which can query any parameter in the associated object. E.g. to do one line item:

    r = REQUEST("ASSOCLP_PARVALUE", "building_type_parameter", name_or_index, type, flags, dim1, dim2, building_type)
    
    STYLE 'txtStyle'
    TEXT2 0, 0, building_type

    www.brucepwalker.com
    https://www.mindmeister.com/65450406

    AC20 6005 AUS Full & AC 21 3009 NZE Full | Win 10 Pro 64 | Intel i7-7700HQ 2.80GHz | 16 Gb RAM
    NVIDIA GeForce GTX 1060 8Mb

You must be logged in to reply to this topic.