DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Dimension Numbers as 2D rather than 3D Text

Started by samdavo, March 13, 2013, 06:02:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

Not sure if anyone knows how to do dimensions with 2D text from the get-go.
I am using V22-3D max - however almost always I only need a 2D drawing.

So I'm usually in 2D mode , and dimension text is set as "True Type Font", and orientation "normal", and I haven't ticked "same as normal text" (i.e. unticked) .....

At the moment I usually get 3D text with dimensions - which I don't like because they are strangely bold and out of place on a 2D drwg imo - exploded into lines arrows and text because I tick "draw as text" so that I can add to them (eg "600" becomes "2 at 300 = 600mm minimum" etc) - And finally (or from time to time) I use a macro called Fix3Dtext which DT kindly sent me. Copy of that macro enclosed. This converts the text to 2D, and no longer bold.

All good, even if I do it only once on completion of a drawing (provided I selected all layers to pick up all such dimensions).

I get there in the end, but it seems I should be able to do 2D first up. (?)

Incidentally, I realise you can opt for 2D text when adding just text; but no such option presents when you do a linear dimension. And even if you have text (i.e. normal text) ticked as "2D text", and even if you make the dimension "same as normal text" - which I tried as a long shot - it doesn't avoid the dimension being 3D.

prl

#1
Quote from: samdavo on March 13, 2013, 06:02:20 PM
Not sure if anyone knows how to do dimensions with 2D text from the get-go.

You are asking for something that DesignCAD never did.  Dimensioning even back in only a 2d environment always created type 3 text bundled in the dimension grouping (see definitions below).  This is true regardless if the dimension is still a true dimension or whether the dimension text was extracted as "just text". 

Definitions:

Type 3 text - called 3d text.    When in 3d mode, the text is stationary in the plane where it was created regardless how the model is rotated.  Historical default for dimensioning.
Type 13 text - called 2d text.   I call this type of text, screen facing text.  When in 3d mode, this text is always normal to the screen no matter how the model is rotated.

So you are working in 2d mode, dimensioning with exploded text and you want the text to be type 13 screen facing text (a text entity created for 3d mode) because type 3 text (which in 2d mode always faces the screen anyway) is causing display issues?

Perhaps you can report or show the issues you are seeing.  Sounds like a display bug that needs to be addressed. 

samdavo

#2
prl
I enclose a couple of macros,  one that is WRONG, and one that is corrected. 
These are macros that I wrote way back (2002).
The second is almost as good as DT's but you have to select-all or select-part etc that you want changed.  DT's is fractionally easier.

Also a couple of screen shots,
a) one with both before and after using the former, 
b) a second attachment after using the latter.

If you look at the first attachment (a), you will see that "Change Text" in the macro toggles 3D to 2D,  but also toggles 2D to 3D.  Hence it is wrong. i.e. you can't use Change Text to do this  (PS well, you can, but you have to be careful - see DT's macro posted and discussed below) .
Note that the 3D text is strangely bold (as I explained in the first post).

The corrected macro interrogates whether type 3 or type 13 text, then changes it only if it is type 3.

Anyway it is an interesting example of how not to write a macro.

Herewith the correct macro (seems I wrote it - or maybe found it in sample macros? - to use with early imports from Autocad):-
........................
Window 30, 50       ' converts 3d text to 2d text

Print "converts 3d text to 2d-usually necy with imports from autocad"
max = Sys(80)

If Sys(80) < 1 Then
    Message "Nothing to do! Select something first..."
    End
End If

For i = 1 To max
    GetSelect i, j
    GetAttr j, etype, eselect, elayer, egroup, ered, egreen, eblue, esolid

If etype = 3 Then
  Print " 3D text, layer", elayer, "converted"
  etype = 13
  Goto cont
end if

cont:
PutAttr j, etype, eselect, elayer, egroup, ered, egreen, eblue, esolid

Next i
Anykey




samdavo

Herewith the WRONG macro (where Convert Text toggles rather than fixes the 3D to 2D) :-
..................
Window 30, 50       ' converts 3d text to 2d text
' for editing purposes

Print "converts 3d text to 2d-using Converttext"
max = Sys(80)

If Sys(80) < 1 Then
    Message "Nothing to do! Select something first..."
    End
End If

For i = 1 To max
    GetSelect i, j
    GetAttr j, etype, eselect, elayer, egroup, ered, egreen, eblue, esolid

If etype = 3 Then
  Print " 3D text, layer", elayer, "converted"
  >ConvertText
{
  }

  Goto cont
end if

cont:

Next i
Print "no 3D text found"
Anykey

samdavo

#4
Finally here is DT's macro - obviously much neater, because it selects only the 3D text to start with, albeit only in editable layers.   (Perhaps it has evolved here in this forum? - anyway I thank DT for sending it to me, and for setting my thinking a bit straighter).

..........
'Fix3DText
'Selects all 3D text (on editable layers) and converts it to 2D text

'Clear the selection (if any)
Sys(80) = 0

' Select 3D Text (only works on visible, editable layers)
>EntitySelect
{
  <Type 3
}

' If any text selected, convert it to 2D text
If Sys(80) > 0 Then
  >ConvertText
  {
  }
End If

' Clear the selection

Sys(80) = 0

Message "Done"

samdavo

#5
prl
Finally - I have to admit that it doesn't affect the way the text prints.  But it does make the text harder to read on the screen (2 cents).
....
OOPS - sometimes it also affects how it prints, especially for small font on the printout (i.e. I take that last sentence back). 

samdavo

#6
An example attached - both on screen and as printed.

samdavo

ok, (rather than alarm anyone, I post the following solution, all pretty simple/basic...)
I'm perfectly content on this score; (and I should say that I never treated this as a major problem ...)

I've renamed "hotkey B"  (for bi-macro) as the following macro, which I call "Fix3D plus Regen".  It is a combination of DT's "Fix3DText" macro, and "regenerate"  (which - big deal - is just the last 3 lines).

My motivation?  Don't know if everyone has this problem, but I find I frequently have to regenerate...  and hence, why not convert 3D text at the same time?   
...............

And occasionally, run it ( i.e. hotkey B) with "manipulate all layers" chosen  (= my hotkey A).
So, in summary, between hotkeys 1-9 (for that layer), A (for all), F (for fit to window), and B (for Bi-macro),  you can "scream" through a drawing (2cents).
......

'Bi-macro = Fix3DText + Regenerate
'Selects all 3D text (on editable layers) and converts it to 2D text + Regenerate

'Clear the selection (if any)
Sys(80) = 0

' Select 3D Text (only works on visible, editable layers)
>EntitySelect
{
  <Type 3
}

' If any text selected, convert it to 2D text
If Sys(80) > 0 Then
  >ConvertText
  {
  }
End If

' Clear the selection
Sys(80) = 0

>regenerateall
{
}

prl

#8
samdavo,

Interesting.  It is a "true type" font display defect. Why the same font displays differently when assigned as type 3 versus type 13 text is the defect, it shouldn't.

I've never encountered this since I don't use "true type" fonts.  True Type fonts greatly reduce DesignCAD regen speeds especially in text packed multi-sheet drawings.  Anyway, your quick conversion fixes are good work-arounds for getting better display results (though they force the user to explode the dimension text).

Maybe when  DesignCAD updates their graphics display engine driven by Windows 8, this will be addressed.

samdavo

#9
Thanks prl,
I'm guessing that "Simplex2 for Windows" is your preference, and maybe some sort of industry standard (?)
(since that is what true font Arial seems to convert to when vectored).

samdavo

#10
PS.  As an aside, (rocket science doesn't get any simpler than this post lol)

I have considered dumping Arial Il1rnm & using a font with more serifs,  eg Times New Roman Il1rnm or better Courier Il1rnm - albeit spaced out and old-fashioned mmm nnn iii etc ...
(or best Century, not available here, so I have used Courier which is similar - see attachment below for accurate font presentation) ...
ever since I heard a newsreader (here in Australia) talking about a North Korean incident, referring to the then leader as Kim Jong the second :)    (compare Queen Elizabeth II)

Hence I introduce the concept of the Kim Jong-il test,  or better still "I, Kim Jorng-il the second or eleventh test"  which also compares the clarity of "rn" vs "m",   similar to  yarn  vs yam.   

And if you compare the following, the capital I, lower case l, and number 1 all steer you to (Courier or) Century (imo)
as does the rn vs m test (2 cents)

PS clearly Courier is too spaced out (fixed size of typewriter letter "blockset") for modern documents - Possibly I should not have mentioned it - except that it is the clearest least ambiguous of all. 

samdavo


prl

Quote from: samdavo on March 15, 2013, 03:28:35 PM
I'm guessing that "Simplex2 for Windows" is your preference, and maybe some sort of industry standard (?)

Yes, keeping it simple and most importantly fast since the Windows DesignCAD is a somewhat slow and inefficient CAD program when drawings get large.

. . . And for you guys that go way back to the days of pen plotters, actually called dcad3.vfn (vector font), which I still use.

samdavo

#13
Thanks prl.
I may try it sometime, but clearly I do smaller drawings than you do, as the time to regenerate isn't a problem for me.  Simplex_WIN certainly passes the jim jong il test.
PS  because capital I, and lower case l are easily differentiated, with a slight bend in the latter   However I notice that for Simplex2, there is no difference between them.

But what IS a potential problem is the frequency of regens.   Lately I seem to have to regen every minute or more frequent still.  Maybe it's the way my program is set up, especially at work, where some files (eg Mydocs for some programs) are kept on the server (?)  (Much faster to save drawings direct to C:\2013dc\A4 incidentally).  It is why I changed my "regen hotkey" to B rather than reaching over to F9 - I even considered making it the space bar (as I never type commands there these days).   [PS but in summary, regen is very quick, so it's not too serious].
 
I notice that, (correcting something I said before), if you change various true fonts to vector, they default to Simplex_Win, but only if that is what you have set in the Text box for Vector Font, even if you untick in preference to True Type Font.

(If you have Simscript or whatever set for new Vector text, even if unticked, then, when you change a note from true to vector,   it changes to that).

Likewise when you (then) change back to true font, the text changes to whatever is set for new text, not what it was.  (2 cents).   Nothing too surprising or earth-shattering there.

DrollTroll

The need to regen frequently is most often due to Microsoft Intellipoint. It will show in the Windows Task Manager as "ipoint.exe". Kill that process and that should help.
25 years with DesignCAD