ParallelGraphics Forums
Authoring Tools
You are here: [Forums]::[Authoring Tools]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
Try RobinZone!
email:  password:
  Authoring Tools

Subject: Re: reformatting coordindex
Sender: arjo.rozendaal@xs4all.nl 7.12.05 12:10
...
I just tried the vrmlpad demo and it seems very handy. I'm missing one option though. My 3D app creates fields like coordindex with one number on one line. I did try sitepad pro and in this app I could "reformat" a block of values to fit on a few lines instead of one number on every new line.
...
Is there a way to delete linefeeds for a selection?
...

Try this macros:

BindCommand "Reformat", "Reformat text", "&Reformat", , "shell32.dll#54"

Public Sub Reformat
BeginOperation "Reformating"
For Each nod In StdProtos("IndexedFaceSet").Instances
    Set reg = New RegExp
    reg.Pattern = "\r\n"
    reg.Global = True
    txt = nod("coordIndex").Range.Text
    txt = reg.replace(txt,"")
    nod("coordIndex").Range.Text = txt
    txt = nod("coord")("point").Range.Text
    txt = reg.replace(txt,"")
    nod("coord")("point").Range.Text = txt
Next
EndOperation
End Sub

OK I tried it and it convinced me, so I'll buy it shortly.
I don't know much about writing javascript but I could even change the script a little bit to let it delete the tabs too.

One question left though:

Do I have to worry about the length of the line?
Is there a limit in linelength?
Other reformat options I saw in other editors did put the numbers in something like 80 characters wide lines.

Maybe too much to ask but how could I insert breaks at such a width automatically? If necessary of course.

Another thing left to do is automatically deleting standard output of my 3D app like zero rotation and translation, but I might be able to write that myself, not sure though.

Arjo.

 


reformatting coordindex / arjo.rozendaal@xs4all.nl / 30.11.05 10:33
     Re: reformatting coordindex / Uh / 7.12.05 08:53
         Re: reformatting coordindex / arjo.rozendaal@xs4all.nl / 7.12.05 12:10

Messages in thread: 3


© 1998-2007 ParallelGraphics. All rights reserved. Terms of use.