Any alternative for srxtext.vlx ?

Any alternative for srxtext.vlx ?

jtm2020hyo
Collaborator Collaborator
5,043 Views
30 Replies
Message 1 of 31

Any alternative for srxtext.vlx ?

jtm2020hyo
Collaborator
Collaborator

https://www.cadstudio.cz/en/apps/srxtext/

I found this .vlx but does not work, at least for me, I think this because of the need to pay. So I need an alternative.

image.png

 

 

 

0 Likes
5,044 Views
30 Replies
Replies (30)
Message 2 of 31

Luís Augusto
Advocate
Advocate

Does not the 'Find' command meet your needs?

 

Find and Replace Dialog Box (FIND)

About Finding and Replacing Text

 

or you can have a look at these routines

 

Regular expressions

Message 3 of 31

jtm2020hyo
Collaborator
Collaborator

@Luís Augusto wrote:

Does not the 'Find' command meet your needs?

 

Find and Replace Dialog Box (FIND)

About Finding and Replacing Text

 

or you can have a look at these routines

 

Regular expressions


Wild Cards used for the command FIND is very limited. I need a REGEX alternative like srxtext.vlx.

 

Before leave an answer to your linked post I will need test those lisp routines.

 

For now I can just say thank for your help.

 

 

 

 

 

 

 

 

 

 

 

 

0 Likes
Message 4 of 31

jtm2020hyo
Collaborator
Collaborator

I was testing the regex lisp and that work but does not what I need. (maybe I need a small guide)

 

I need to FIND/REPLACE option.

Is there any other regex routine to test?

or maybe do you know a complete guide for "srxtext.vlx"

0 Likes
Message 5 of 31

Luís Augusto
Advocate
Advocate

I think this might help you better understand regular expressions.
Have a great year and good studies.

 

https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-refere...

https://medium.com/tech-tajawal/regular-expressions-the-last-guide-6800283ac034

 

Luís Augusto

Message 6 of 31

vladimir_michl
Advisor
Advisor
Accepted solution

Most of the srxText functionality is free - what does not work for you?

See number of examples: https://www.cadforum.cz/cadforum_en/tips.asp?t=srxText

 

Vladimir Michl, www.cadstudio.cz

 

Message 7 of 31

jtm2020hyo
Collaborator
Collaborator

hanks for your help friend.

Yes I was studing SRSTXT.vlx a time ago.

I remember that srxtexthave 2 kinds of regex. one basic for srxtext and another more complex and complet for srxtext2. I can with the single srxtext, but I need to work with the srxtext2 command.

i found some guides for srxtext2, according to some post srxtext2 use VBscript regex, then I was searching for a guide for VBscript and I tested some examples for srxtext2, but does not works. I tried some examples from their own website and sometimes work and other does not. 

so I request a guide for "srxtext2" command.   "srxtext" work perfectly.


0 Likes
Message 8 of 31

vladimir_michl
Advisor
Advisor
Accepted solution

If you would send a specific case of what doesn't work for you, I can help you. So far, all type of text replacements were successfuly done with the srxText utility.

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 

Message 9 of 31

jtm2020hyo
Collaborator
Collaborator

@vladimir_michl wrote:

If you would send a specific case of what doesn't work for you, I can help you. So far, all type of text replacements were successfuly done with the srxText utility.

 

Vladimir Michl, www.cadstudio.cz  www.cadforum.cz

 


 

hello. sorry for late response.

 

I was testing again the command srxtext2. but I'm using a different guide.

https://wellsr.com/vba/2018/excel/vba-regex-regular-expressions-guide/

 

https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-language-quick-refere...

 

Until now. all work well. but If I find a problem I will report it in this post.

 

I will keep testing your awesome code. thanks for pay attention. 

0 Likes
Message 10 of 31

jtm2020hyo
Collaborator
Collaborator

could add support for rename Model or paper space views, and cameras?

0 Likes
Message 11 of 31

vladimir_michl
Advisor
Advisor
Accepted solution

srxText is just for drawing texts, we have a similar tool - RRename - for renaming of DWG symbols and tables (Layers, Layouts, Blocks, etc.) - Views and Cameras are not included but I will look at it

 

Vladimir Michl, www.cadstudio.cz - www.cadforum.cz

 

Message 12 of 31

vladimir_michl
Advisor
Advisor
Accepted solution

Views (incl. cameras), materials, groups, UCSs, styles and other tables have been now added to the RRename freeware utility - see:

CAD Forum - RENAME on steroids - complex renaming of AutoCAD objects.

 

Vladimir Michl, www.cadstudio.cz - www.cadforum.cz

 

Message 13 of 31

jtm2020hyo
Collaborator
Collaborator

wow, so fast, thanks a lot.

0 Likes
Message 14 of 31

jtm2020hyo
Collaborator
Collaborator

I am not sure, maybe I did something bad, but I can not rename cameras and viewports:

 

 

Command: RRENAME
Rename [Blocks/Layers/lineTypes/layOuts/Views/Textstyles/Dimstyles/tAblestyles/Materials/viewPorts/Ucs/Groups] <Layers>: p
Use () and $1 for regular expressions, # as counter
Source substring or regex to find (e.g. '(.+)'): test1
Target substring or regex to replace (e.g. '$1_NEW'): test01
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 100
;   Center = (5.86559 4.5)
;   Direction = (0.0 0.0 1.0)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = 0
;   Handle (RO) = "1B72"
;   HasExtensionDictionary (RO) = 0
;   Height = 9.20623
;   LowerLeftCorner (RO) = (0.0 0.0)
;   Name = "$RECOVER_201211223519-0"
;   ObjectID (RO) = 42
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = 0
;   SnapRotationAngle = 0.0
;   Target = (0.0 0.0 0.0)
;   UCSIconAtOrigin = 0
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (1.0 1.0)
;   Width = 12.0
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 1000
;   Center = (-25.7872 630.066)
;   Direction = (9.54969e-12 -9.09495e-13 43031.8)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = 0
;   Handle (RO) = "20214E0"
;   HasExtensionDictionary (RO) = 0
;   Height = 20885.3
;   LowerLeftCorner (RO) = (0.0 0.0)
;   Name = "*Multiple"
;   ObjectID (RO) = 44
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = 0
;   SnapRotationAngle = 0.0
;   Target = (3043.57 7714.43 15136.2)
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (0.75 1.0)
;   Width = 20324.4
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 1000
;   Center = (0.0 0.0)
;   Direction = (-3254.62 -6672.95 5249.8)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = -1
;   Handle (RO) = "20214E1"
;   HasExtensionDictionary (RO) = 0
;   Height = 18960.8
;   LowerLeftCorner (RO) = (0.75 0.333333)
;   Name = "*Multiple"
;   ObjectID (RO) = 45
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = -1
;   SnapRotationAngle = 0.0
;   Target = (-531.994 10091.5 3625.44)
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (1.0 0.666667)
;   Width = 18760.6
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 1000
;   Center = (0.0 0.0)
;   Direction = (-7.27596e-12 0.0 42896.1)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = -1
;   Handle (RO) = "20214E2"
;   HasExtensionDictionary (RO) = 0
;   Height = 89935.3
;   LowerLeftCorner (RO) = (0.75 0.0)
;   Name = "*Multiple"
;   ObjectID (RO) = 46
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = -1
;   SnapRotationAngle = 0.0
;   Target = (42635.2 15883.7 6532.86)
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (1.0 0.333333)
;   Width = 88032.2
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 1000
;   Center = (2957.89 -2170.28)
;   Direction = (13182.0 -38283.3 3.63798e-12)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = -1
;   Handle (RO) = "202152E"
;   HasExtensionDictionary (RO) = 0
;   Height = 35288.4
;   LowerLeftCorner (RO) = (0.75 0.666667)
;   Name = "*Active"
;   ObjectID (RO) = 47
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = 0
;   SnapRotationAngle = 0.0
;   Target = (2617.57 9798.53 15130.9)
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (1.0 1.0)
;   Width = 34533.6
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 1000
;   Center = (-661.437 -260.898)
;   Direction = (9.54969e-12 -9.09495e-13 43031.8)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = -1
;   Handle (RO) = "2021C5B"
;   HasExtensionDictionary (RO) = -1
;   Height = 26035.1
;   LowerLeftCorner (RO) = (0.0 0.0)
;   Name = "*Active"
;   ObjectID (RO) = 48
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = 0
;   SnapRotationAngle = 0.0
;   Target = (3043.57 7714.43 15136.2)
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (0.75 1.0)
;   Width = 25358.6
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 1000
;   Center = (-844.851 -5486.28)
;   Direction = (-1.09139e-11 0.0 49988.5)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = -1
;   Handle (RO) = "2021C5C"
;   HasExtensionDictionary (RO) = 0
;   Height = 27234.9
;   LowerLeftCorner (RO) = (0.75 0.0)
;   Name = "*Active"
;   ObjectID (RO) = 49
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = 0
;   SnapRotationAngle = 0.0
;   Target = (2515.05 9566.59 15368.0)
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (1.0 0.333333)
;   Width = 26652.4
; IAcadViewport: A bounded area that displays some portion of a drawing's model space
; Property values:
;   Application (RO) = #<VLA-OBJECT IAcadApplication 00007ff73d50d9a0>
;   ArcSmoothness = 1000
;   Center = (5887.19 -10069.5)
;   Direction = (-14436.2 -29598.7 23286.1)
;   Document (RO) = #<VLA-OBJECT IAcadDocument 00000194de03c1a8>
;   GridOn = -1
;   Handle (RO) = "2021C5D"
;   HasExtensionDictionary (RO) = 0
;   Height = 22222.5
;   LowerLeftCorner (RO) = (0.75 0.333333)
;   Name = "*Active"
;   ObjectID (RO) = 50
;   ObjectName (RO) = "AcDbViewportTableRecord"
;   OrthoOn = 0
;   OwnerID (RO) = 43
;   SnapBasePoint = (0.0 0.0)
;   SnapOn = 0
;   SnapRotationAngle = 0.0
;   Target = (2617.57 9798.53 15130.9)
;   UCSIconAtOrigin = -1
;   UCSIconOn = -1
;   UpperRightCorner (RO) = (1.0 0.666667)
;   Width = 21985.3
Performed 0 rRenames
Command:
Command: Specify opposite corner or [Fence/WPolygon/CPolygon]:
Automatic save to C:\Users\JTM2020hyo\AppData\Local\Temp\Camaras 1_1_16600_23a8f365.sv$ ...
Command: Updating Indexes for block *Model_Space
Done.

 

 

... but with layers work perfectly.

0 Likes
Message 15 of 31

jtm2020hyo
Collaborator
Collaborator

attached file where I was testing the last version of rrename.vlx

0 Likes
Message 16 of 31

vladimir_michl
Advisor
Advisor
Accepted solution

Sorry, there was a debug message forgotten in the code (please re-download the updated version from cadstudio.cz or cadforum.cz). I have tested the view/camera rename on your DWG and it seems to work fine - performed change from "16500" to "xxxx".

 

Vladimir Michl, www.cadstudio.cz - www.cadforum.cz

 

Message 17 of 31

jtm2020hyo
Collaborator
Collaborator

I tried this:

 

RRename

viewPort

test1

test2

 

Command: RRENAME
Rename [Blocks/Layers/lineTypes/layOuts/Views/Textstyles/Dimstyles/tAblestyles/Materials/viewPorts/Ucs/Groups] <viewPorts>:
Use () and $1 for regular expressions, # as counter
Source substring or regex to find (e.g. '(.+)'): 'test1'
Target substring or regex to replace (e.g. '$1_NEW'): 'test01'
Performed 0 rRenames
Command:

 

...at the same attached file, Did I do something wrong?

0 Likes
Message 18 of 31

jtm2020hyo
Collaborator
Collaborator

PD: I tried since AutoCAD 2021 and AutoCAD Arch/MEP 2021

0 Likes
Message 19 of 31

vladimir_michl
Advisor
Advisor
Accepted solution

I can see two problems:

- enter the search/replace strings without quotes - i.e.: test1, not 'test1'

- the "test1" is probably a View, not a Viewport (looking into your sample DWG)

 

Vladimir Michl, www.cadstudio.cz - www.cadforum.cz 

 

Message 20 of 31

jtm2020hyo
Collaborator
Collaborator

sorry, I always thought than View=Viewports, RRename.vlx works perfectly.

 

image.pngimage.png\

 

 

 

Command: RRENAME
Rename [Blocks/Layers/lineTypes/layOuts/Views/Textstyles/Dimstyles/tAblestyles/Materials/viewPorts/Ucs/Groups] <layOuts>: p
Use () and $1 for regular expressions, # as counter
Source substring or regex to find (e.g. '(.+)'): 16500
Target substring or regex to replace (e.g. '$1_NEW'): xxx
 16500->xxx
Performed 1 rRename
Command:
Command:
Command:
Command: _+vports
Tab index <0>: 1 Regenerating model.

 

 

thanks a lot.

but how can I use rrename.vlx with cameras? cameras are not views? if not, could add support for views?

 

 

Command: RRENAME
Rename [Blocks/Layers/lineTypes/layOuts/Views/Textstyles/Dimstyles/tAblestyles/Materials/viewPorts/Ucs/Groups] <viewPorts>: p
Use () and $1 for regular expressions, # as counter
Source substring or regex to find (e.g. '(.+)'): camera1
Target substring or regex to replace (e.g. '$1_NEW'): camera01
Performed 0 rRenames
Command:

 

 

 

 

 

 

 

0 Likes