Author Topic: Create a 'dynamic' Text that always faces the screen with a certain size?  (Read 8251 times)

0 Members and 1 Guest are viewing this topic.

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #15 on: January 04, 2020, 09:47:24 AM »
The attached gif explains what snownut2 is referring to. Put the text in paperspace and work on your model through an unlocked viewport.
I do understand paperspace will make the sizes fixed. But like I have explained, this is not what I wanted to do. Take
Grrr1337's gif as an example, I want the line object information to be displayed at the middle point of each line. Whenever I move/rotate the view port, the object information text will follow the line objects instead of having fixed locations. it is basically like normal texts, but they are always facing the screen with a fixed sizes.

You can try to turn on Quick Properties Palette with CTRL+SHIFT+P and select entity (PICKFIRST=1)... Basic info ab entity will pop up and you can continue working in 2D/3D... The point is that this feature can't operate separately for each entity selected... If that would be the situation you are looking for, it would be real mess with all those pop ups scattered around interface... Then you won't be able to work normally... My suggestion is that you always have main property palette on - docked left/right and only when needed to see info, you select entity/entities and move mouse left/right to see info palette... This is always facing to the view no matter you are orbiting in 3D or zooming/panning...
Further more you don't need any code/reactor active - it is standard way of working in CAD applications...
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

snownut2

  • Swamp Rat
  • Posts: 971
  • Bricscad 22 Ultimate
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #16 on: January 04, 2020, 11:38:48 AM »
Not sure you've though that through, once you get just a few lines drawn the entire screen will be unreadable, just my 2cents......

TheRubens

  • Guest
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #17 on: January 05, 2020, 04:02:57 AM »
The attached gif explains what snownut2 is referring to. Put the text in paperspace and work on your model through an unlocked viewport.
I do understand paperspace will make the sizes fixed. But like I have explained, this is not what I wanted to do. Take
Grrr1337's gif as an example, I want the line object information to be displayed at the middle point of each line. Whenever I move/rotate the view port, the object information text will follow the line objects instead of having fixed locations. it is basically like normal texts, but they are always facing the screen with a fixed sizes.

You can try to turn on Quick Properties Palette with CTRL+SHIFT+P and select entity (PICKFIRST=1)... Basic info ab entity will pop up and you can continue working in 2D/3D... The point is that this feature can't operate separately for each entity selected... If that would be the situation you are looking for, it would be real mess with all those pop ups scattered around interface... Then you won't be able to work normally... My suggestion is that you always have main property palette on - docked left/right and only when needed to see info, you select entity/entities and move mouse left/right to see info palette... This is always facing to the view no matter you are orbiting in 3D or zooming/panning...
Further more you don't need any code/reactor active - it is standard way of working in CAD applications...

Sorry my bad. I didn't mean I want to show properties of objects. I just took Grrr1337's gif as an example. I want the text to be whatever I want them to be as long as they can always face the screen.

TheRubens

  • Guest
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #18 on: January 05, 2020, 04:06:05 AM »
Not sure you've though that through, once you get just a few lines drawn the entire screen will be unreadable, just my 2cents......
You are probably right. So now I am not gonna make the size to be fixed. So the only difference between the text I want with the normal texts is to make them always facing the screen in a 3D model. Is this possible? I have seen other software do it this way. It makes it easier and nicer to view the text in 3D models.
Looking back again, I don't think it will be unreadable even if I make the size fixed. I have tried using other 3D software and they are doing exactly what I wanted. I just don't know how to make videos to better explain what I want...
« Last Edit: January 05, 2020, 11:16:06 PM by TheRubens »

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #19 on: January 05, 2020, 06:21:33 AM »
What do you want to show if it is not properties?
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

hanhphuc

  • Newt
  • Posts: 64
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #20 on: January 05, 2020, 08:35:25 AM »
Quote

You are probably right. So now I am not gonna make the size to be fixed. So the only difference between the text I want with the normal texts is to make them always facing the screen in a 3D model. Is this possible? I have seen other software do it this way. It makes it easier and nicer to view the text in 3D models.
Something like this?

https://knowledge.autodesk.com/sites/default/files/my_first_autocad_plugin_promo_video_924x694_0.mp4
( apply 'equal "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" ) ; error: too many arguments

TheRubens

  • Guest
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #21 on: January 05, 2020, 11:10:48 PM »
What do you want to show if it is not properties?
It can be part of the properties like layer, or it can be any other text that I want it to be, for example, I might assign additional properties to the lines.

TheRubens

  • Guest
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #22 on: January 05, 2020, 11:12:04 PM »
Quote

You are probably right. So now I am not gonna make the size to be fixed. So the only difference between the text I want with the normal texts is to make them always facing the screen in a 3D model. Is this possible? I have seen other software do it this way. It makes it easier and nicer to view the text in 3D models.
Something like this?

https://knowledge.autodesk.com/sites/default/files/my_first_autocad_plugin_promo_video_924x694_0.mp4

Pretty much! For example, I want the text in you video to be always at the centre of the circle when I rotate.

huiz

  • Swamp Rat
  • Posts: 913
  • Certified Prof C3D
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #23 on: January 06, 2020, 08:28:01 AM »
[..]

Pretty much! For example, I want the text in you video to be always at the centre of the circle when I rotate.




You want someone else to write such a function? If you can't develop such a function with the given examples, you might invest some time in the tooltips you can customize in AutoCAD. I think that is the easiest way to show object information without programming. And it will not polute your view on the drawing :-)




https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/AutoCAD-LT/files/GUID-BCC6FDB2-F4EA-4BE1-AC49-48EFE687DD2B-htm.html



The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

TheRubens

  • Guest
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #24 on: January 06, 2020, 05:21:33 PM »
[..]

Pretty much! For example, I want the text in you video to be always at the centre of the circle when I rotate.




You want someone else to write such a function? If you can't develop such a function with the given examples, you might invest some time in the tooltips you can customize in AutoCAD. I think that is the easiest way to show object information without programming. And it will not polute your view on the drawing :-)




https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/AutoCAD-LT/files/GUID-BCC6FDB2-F4EA-4BE1-AC49-48EFE687DD2B-htm.html

Nope. I am NOT asking anyone to write any scripts for me. I simply wanna know whether it is possible to achieve this and how to make it work if so. The thing is I will write more information into the objects and then display them, the method you mention will not achieve this. So please forget the object information, it was just an example. What I really wanna do is create texts that like normal texts but always face the screen with a fixed size in a 3D model, simple as that.

hanhphuc

  • Newt
  • Posts: 64
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #25 on: January 07, 2020, 10:12:36 AM »
Quote

You are probably right. So now I am not gonna make the size to be fixed. So the only difference between the text I want with the normal texts is to make them always facing the screen in a 3D model. Is this possible? I have seen other software do it this way. It makes it easier and nicer to view the text in 3D models.
Something like this?


Pretty much! For example, I want the text in you video to be always at the centre of the circle when I rotate.

AFAIK (ac2007) grdraw or grvecs does not support multiple viewports ,
i.e dynamic transient effect only works in single active space

.NET tutorial is interesting unfortunately i can't try it, minimum requirement v2012-2020
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/simplecontent/content/my-first-autocad-plug-overview.html

can try reactor but its not dynamic,
perhaps alternative way is to write a function which
iterates thru ssget your filtered 'TEXT' collection, then modify 'Height' & 'Normal' properties which related to 'viewdir'

Code: [Select]
     
(mapcar ''((a b) (vlax-put obj a b))
      '(Height Normal)
      (list (* 5.0 (/ vs (cadr sc))) (getvar 'viewdir))
      )
where vs=viewsize, sc=screensize are sysvar

Looking back again, I don't think it will be unreadable even if I make the size fixed. I have tried using other 3D software and they are doing exactly what I wanted.

if your textsize is relatively 5% to viewsize, when you zoom far out, the texts still overlap & unreadable
( apply 'equal "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" ) ; error: too many arguments

TheRubens

  • Guest
Re: Create a 'dynamic' Text that always faces the screen with a certain size?
« Reply #26 on: January 09, 2020, 07:26:35 PM »
Quote
AFAIK (ac2007) grdraw or grvecs does not support multiple viewports ,
i.e dynamic transient effect only works in single active space

.NET tutorial is interesting unfortunately i can't try it, minimum requirement v2012-2020
https://knowledge.autodesk.com/support/autocad/learn-explore/caas/simplecontent/content/my-first-autocad-plug-overview.html

can try reactor but its not dynamic,
Thank you. I think the previous video you sent has achieved pretty much what I wanted, is there any lisp version for that one? I don't mind have a single viewport only as long as it can maintain the text 210 dxf property.

Quote
perhaps alternative way is to write a function which
iterates thru ssget your filtered 'TEXT' collection, then modify 'Height' & 'Normal' properties which related to 'viewdir'

Code: [Select]
     
(mapcar ''((a b) (vlax-put obj a b))
            '(Height Normal)
            (list (* 5.0 (/ vs (cadr sc))) (getvar 'viewdir))
            )
where vs=viewsize, sc=screensize are sysvar
Not very familiar with reactor yet but will definitely try.

Quote
if your textsize is relatively 5% to viewsize, when you zoom far out, the texts still overlap & unreadable
I think this is fine, if you zoom far out the texts will be unreadable with fixed sizes as well. And I have seen many 3D software do it this way. That being said, I don't mind have texts height fixed. The critical part is to maintain the texts normal properties so the texts can be easier to view in 3D model.
« Last Edit: January 09, 2020, 07:37:02 PM by TheRubens »