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.

Change Hidden Attributes to Text

Started by aqua, January 05, 2008, 01:41:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aqua

Designcad 13.13

I have a drawing that has hidden attributes on layer 126.
I would like change these to visible text
Does anyone know the exact code that would do this.
I have some code below but I am missing the key method to achieve this.

Thanks Frank


'FTM
'Change Attributes to Text
sys(80)=0
>SelectLayer
{
<Layer [126]
}

if sys(80)=0 then end
if sys(80) > 0 Then
for j = 1 to sys(80)
GetSelect j, k 'store the entity id of selected entity j in k
Entity k
    getattr k, type, select, layr, group, red, green, blue

'Note - This next code didn't work - expect we need to obtain the text out of the attribute
' then recreate the text - then delete the atributes
if type = 15 then type = 3
  putattr k, type, select, layr, group, red, green, blue
  next
endif

Lar

Frank, Explode the Attribute to make it 3D Text. If you need 2D Text then Text Convert.

Lar

aqua

Lar

>Explode
{
}

turns then into vectors.
Wanted to turn them into 2D or 3D text

Regards Frank

Bob P

sys$(1) will return the text string from text or attribute that was loaded with the Entity statement.

Of course you will also have to "grab" a point from the attribute to place the text with the >text command.

aqua

Bob

Thanks. The following code worked


'Now need to adjust attributes to text
OrgCount = Sys(9)
For i = OrgCount to 1 Step -1
    GetAttr i, type, sel, layr
    If type = 15 And layr = 126 then
sys(3)=126
        Gosub fixup
    End If
Next i


' Subroutine fixup
fixup:
Entity i
Pointval xc yc zc 1
Contourtext$ = sys$(1)
Sys(1) = 0 ' clear points
Sys(80) = 0 ' clear selection (just in case)
PutAttr i, 70, 1 ' select the attribute, then erase it
>Erase
{
}
Precision 0
>TEXT2D
{
    <Size [10]
    <Pointxyz [xc + 5, yc - 5 - size2, zc]
    <Text [Contourtext$]
}
Return


Lar

Sorry Frank. I have to remember we reside in different worlds. In 16, 17 and 18 attributes explode down to 3D Text. I can check 14 and 15 on my old laptop later.

13 was the worst version ever for me. Points had a way of not staying where I left them, if I remember right.

Lar

aqua

#6
Lar

You must not have used 13.13!
After 13 attempts on the 13th attempt - you'd have to think they would get it right.
Only 4 main issues with 13.13

1: If it is doing a task - and an OLE outside program tells it to do something extra - it jams the outside program.

2: Images only rotate in 1 deg increments

3: The cutting line is dodgy - not sure if this has been totallly fixed yet.

4: You can't fill an area with parallel lines - macro code didn't quite solve this

Of the above- only the image rotate is a hassle

The program is very stable and reliable.

18?, well 18.1 killed it and haven't been able to get it going again.

So I just need 13.14 which is an update that just installs the later image handling program and I'll be happy for a while longer.

Cheers Frank

bdeck

Hello Aqua,

V 15.3 is widely available at deep discount from resellers.

Does 15.3 have any issues you are aware of ?

It does not have the rotation problem.


BD

Lar

Here's my historical account of that angel/devil called DesignCAD over the years:

The DOS version was perfect, for its time. Didn't have Ortho Mode, though and had only one Undo, if I remember, right.

The Windows version introduced a lot of things that are regular in windows now: multi files open at once, multi windows per file, floating toolboxes and drawers... white background.

Was it 2000, 3000 , or 12 that introduced paperspace. I remember visualizing a need for what we now call paperspace. Soon after I learned that autocad had it already. Sometime after that dcad introduced it and it was a mess. Stepping into dcad's paperspace was like I was teleported into acad (although acad's paperspace was ok. Never did figure out how to use it, though).

Maybe it was 3000 and not 13 where I would snap a new point to an existing point only to come back later to find the 2 points don't coincide. Lost tons of time correcting these wandering points. That version was a mini-nightmare for me.

I can't remember if 13 or 14 introduced fixed lineweights which was a big plus.

Was it 14 that introduced graphic acceleration. I remember creating some macros (in 13?) to rotate and hide 3d views while I used the arrow keys to turn the view. The next version came out very soon after that and made my macros obsolete. I was quite happy.

15 was good but it messed up paperspace printing by causing all the layouts to print on top of each other (was this fixed in 18?). I use to draw in 15 and print in 14. Bugger.

16 was a mess but it introduced 'Layer Shifting' (my name for the 2 big up and down arrows on the right side of the Layer Dialogue Box). 16 destroyed Symbols for me but brought in the new Snap Grid, which I love. Section Cuts was a mess.

17 was cool. It made an attempt at Multiline Text, which was a mess, but it was very stable after the 16 disaster. Section Cuts was a lot better.

18 destroyed dimensions in the commendable attempt to export dims between d-and-a-cad, but is now in the process of correcting that. 18 seems to have bettered Multiline Text.

Throughout it all no other cad system could beat dcad's easy 3D viewing and zooming, snapping, shortcut keys, macros, accuracy, ease of working (and the amazing ability to export files from an earlier acad to a later one, when acad itself could not do it) so I had no choice but to stick with it.

Lar