Author Topic: One ATTDEF - left / right / center aligned  (Read 8107 times)

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 650
One ATTDEF - left / right / center aligned
« on: February 19, 2015, 04:20:45 AM »
Hi

I need a dyn-block with
- lines with look like an arrow: ---> <--- ....
- one (1) ATTDEF which changes its position and alignment, depending on settings

Example:
Code - Auto/Visual Lisp: [Select]
  1. ----> ATTDEF left aligned
  2.  
  3. ATTDEF right <----
  4.  
  5.   ATTdef centered
  6.         ^
  7.         ¦
  8.         ¦
Can it be done?
« Last Edit: February 19, 2015, 08:39:38 AM by Peter2 »
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

ChrisCarlson

  • Guest
Re: One ATTDEF - left / right / center alihned
« Reply #1 on: February 19, 2015, 09:04:37 AM »
Very crude attempt with visibility states

Peter2

  • Swamp Rat
  • Posts: 650
Re: One ATTDEF - left / right / center aligned
« Reply #2 on: February 19, 2015, 09:20:13 AM »
Hi ChrisCarlson

thanks for the file, but there are 4 ATTDEFs instead of 1. I need only one with "Intelligent behaviour."
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

Peter2

  • Swamp Rat
  • Posts: 650
Re: One ATTDEF - left / right / center aligned
« Reply #3 on: February 19, 2015, 10:50:38 AM »
Maybe here is a (good / the only one / bad) solution, based on some hints in forums.

- Create a "Main"-ATTDEF; Option "invisible" (do be not displayed in drawing), but "Visibility state: always on" (to be displayed always in the dialogue)
- create 4 ATTDEF; prompt something like "don't touch - automatic filling"; "Visibility state" as you need, default as Textfield referenced to the value of the Main-ATTDEF
- make a  block

The doubleclick on the block opens the dialogue to edit the attribs. You will see
- always the main attribute where you write your text
- one of the other ATTDEFs, depending on Visibility State, where you do nothing!

After ENTER nothing will happen, but REGEN will write the new value of main-attdef to all 4 referenced attdefs.


Maybe there is a better solution - comments are welcomed.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: One ATTDEF - left / right / center aligned
« Reply #4 on: February 23, 2015, 10:15:32 AM »
Questions:

What information is in this attribute?

Is it coming from a field, or user defined?

Why not use 'Text Options' of the attribute editor instead?

I ask because I don't see how making this a dynamic block makes anything happen 'automatically'; which would be my criteria for trying to use a dynamic block as the
preferred solution.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Peter2

  • Swamp Rat
  • Posts: 650
Re: One ATTDEF - left / right / center aligned
« Reply #5 on: February 23, 2015, 11:01:05 AM »
Hi mjfarell

I have a Screencast which is commented (in German), but I'm sure you understand the main purpose: This examples shows that an ATTDEF which changes its position should also change its alignment (left / right / centered).

http://autode.sk/1DDIDe5

...What information is in this attribute?...
It is a simple, old ATTDEF which is modified by the user.

...Why not use 'Text Options' of the attribute editor instead?..
This would be the second best solution (more clicks, more errors, less standard). If possible a one-click-solution would be fine.

...I ask because I don't see how making this a dynamic block makes anything happen 'automatically'; which would be my criteria for trying to use a dynamic block as the
preferred solution.
The "automatic" is a selectable display of elements and attribs, using Visibility and attrib-moving. That's not a high-level-automatic; better ideas are welcomed.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: One ATTDEF - left / right / center aligned
« Reply #6 on: February 23, 2015, 11:21:34 AM »
let me think on that....and thanks for entertaining the questions.

First thoughts are the chosen solution is not a best use of a dynamic block to solve the stated problem, or to effect the desired results.

I might want more information to help with that.

This might even be best served by just using a different block, if the 'only' thing being affected is alignment of the text (attribute), and a tool palette
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Peter2

  • Swamp Rat
  • Posts: 650
Re: One ATTDEF - left / right / center aligned
« Reply #7 on: February 23, 2015, 01:08:19 PM »
let me think on that....and thanks for entertaining the questions...
Thanks to you for your replies  :-)

...This might even be best served by just using a different block, if the 'only' thing being affected is alignment of the text (attribute), and a tool palette
The idea comes out of the experience of another system, developed in the late 1990's and still in usage - there are more than 2000 blocks to cover all requirements, based on "one block for every (each?) possibility". Now I try to reduce it and have sometimes 15-18 visibilities ...
System is under development ...
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: One ATTDEF - left / right / center aligned
« Reply #8 on: February 23, 2015, 02:25:36 PM »
I don't know...from my experience; IF you give a user more than one choice
invariably they will chose the wrong one.

By building-in 18 different possible correct answers, if you rely on user input, I can almost guarantee all seventeen wrong answers will be chosen as frequently as the one correct answer.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Peter2

  • Swamp Rat
  • Posts: 650
Re: One ATTDEF - left / right / center aligned
« Reply #9 on: February 23, 2015, 05:30:54 PM »
...By building-in 18 different possible correct answers ...
But if you have 18 different blocks which nearly look alike - you will have the same problem ...
Although my experience which some users is notable too - you have to trust the user that he knows if he needs a "red or green lamp" or a "big or small switch". How to draw the red lamp or the small switch is the job of a fine tuned supporting tool.
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23