Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set the "Border Offset Factor" value in Autocad using Autocad commands or Autocad Object Model?

19 REPLIES 19
Reply
Message 1 of 20
edushka228
1328 Views, 19 Replies

How to set the "Border Offset Factor" value in Autocad using Autocad commands or Autocad Object Model?

The task is to set the "Border offset factor" value for the active document in Autocad using Autocad commands or Autocad Object Model

19 REPLIES 19
Message 2 of 20
imadHabash
in reply to: edushka228

Hi,

The background in Mtexts or Multileaders with Mtext the Border Offset factor is equal to 1.5 by default. 

  • You can select all of your Mtexts then press Ctrl+1 .. from Properties Palette  select Background mask set the Border Offset factor and the color as needed.
  • OR you can edit your registry file ( regedit.exe ) from your Windows OS . But you have to be careful when you do this to avoid any harm to your program.

Imad Habash

EESignature

Message 3 of 20
edushka228
in reply to: imadHabash

i need to change the default value using Autocad commands. Is there a command that allows me to do this? If not, how exactly to edit the registry?

Message 4 of 20
imadHabash
in reply to: edushka228

You cannot change it from AutoCAD commands!! 

>> how exactly to edit the registry?
Open the Windows Run dialog box by pressing the Windows + R keys .

Imad Habash

EESignature

Message 5 of 20
edushka228
in reply to: imadHabash

I know how to open the registry. I don't understand how to find what I need in the registry.

Message 6 of 20
pendean
in reply to: edushka228

Message 7 of 20
edushka228
in reply to: pendean

edushka228_0-1712721905971.png

There is no TextMask_BackgroundScale parameter in the registry, but there are these ones. Which of them should be changed? I need to enter the value 1.1, instead of 1.5, which is set by default

Message 8 of 20
TomBeauford
in reply to: edushka228

I've looked be never found that windows registry key so let us know if you found it.
Many of them aren't saved or aren't saved where you'd expect.
I use Layer States extensively that only include layers they're designed to modify so to prevent the rest of the layers from being turned off I added this to my acaddoc.lsp to prevent it as the value isn't saved.

(vl-registry-write (strcat "HKEY_CURRENT_USER\\" (vlax-product-key) "\\Profiles\\" (getvar "cprofile") "\\Dialogs\\AcLayerApps:LayerStatesManager") "LayerNotFound" "0")
; Layer States Manager - Do not turn off layers not found in layer state

You're probably better off with one of those lisp routines, both of them work great!
64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 9 of 20
edushka228
in reply to: TomBeauford

I used the BGTOOGLE lisp you posted. It does not change the border offset factor.

Message 10 of 20
cadffm
in reply to: edushka228


@edushka228  schrieb:

There is no TextMask_BackgroundScale parameter in the registry, but there are these ones. Which of them should be changed? I need to enter the value 1.1, instead of 1.5, which is set by default


If there isn't, it wasn't used before (or you are at the wrong registry path),

HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\Rnn.n\ACAD-nnnn:nnn\MTEXT\

 
 

 

 

Sebastian

Message 11 of 20
edushka228
in reply to: cadffm

edushka228_0-1712740874228.png

 

Message 12 of 20
cadffm
in reply to: edushka228

This is how it looks after install and you never used MTextbackground (in your CIVIL3D 2024).

 

Did you used MText-background in your Civil3D 2024?

If so, you have a problem: It looks like you (the program) don't have write access to this part of the registry

and that means - you have a lot trouble (not just the Mtext border scale).

 

Please test this:

Restart Civil3D 2024, create a MText and set background with a border scale of 3

Check the registry keys again, press [F5] for refresh regedit.

Still AutoStack the only item in this path?

 

 

Sebastian

Message 13 of 20
edushka228
in reply to: cadffm

I don't have civil 3d, I work in autocad...

Message 14 of 20
cadffm
in reply to: edushka228

But your screenshot showing a path for AutoCAD Civil3D 2024, not for AutoCAD 2024.

(so, Civil3D IS OR WAS installed on this PC)

This is AutoCAD 2024:

HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R24.3\ACAD-7101:4nn

 

 

 

Sebastian

Message 15 of 20
cadffm
in reply to: cadffm

What's up?

 

If you don't have this folder:  C:\Program Files\Autodesk\AutoCAD 2021\C3D\   , you don't need to try this:

[Win]+[R]

open: "C:\Program Files\Autodesk\AutoCAD 2024\acad.exe" /ld "C:\Program Files\Autodesk\AutoCAD 2024\AecBase.dbx"  /product "C3D" /language "en-US"

[OK]

 

..to run Civil3D2024

 

Do you have this folder?

HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R24.3\ACAD-7101:......................

 

 

 
 

 

 

Sebastian

Message 16 of 20
wispoxy
in reply to: edushka228

The answer is you cannot, it's not an option, it's hard coded with no public varible.

Message 17 of 20
wispoxy
in reply to: edushka228

It doesn't even work using the Action Macro Recorder.
Message 18 of 20
pendean
in reply to: edushka228
Message 19 of 20
TomBeauford
in reply to: edushka228

BGtoggle toggles the background On/Off of selected TEXT & MTEXT and sets 'Border Offset Factor' to 1.15, the background color to drawing background color and trims excess width.

Latest version attached.

 

You can set the 'Border Offset Factor' in the MTEXT dialog box or in the Properties Palette.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 20 of 20
pendean
in reply to: edushka228


@edushka228 wrote:

There is no TextMask_BackgroundScale parameter in the registry, but there are these ones. Which of them should be changed? I need to enter the value 1.1, instead of 1.5, which is set by default


pendean_0-1712761919428.png

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report