Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The ESnap box size is a system controlled value (DYNASNAPSIZE) and can be changed or read via C++ as follow:

Code Block
GetFxSystemServices()->GetHostAppServices()->setDYNASNAPSIZE( YOUR_DYNASNAPSIZE );
GetFxSystemServices()->GetHostAppServices()->getDYNASNAPSIZE();


Note: The ESnap box size varies with the display resolution to the Android device. We recommend to update the value YOUR_DYNASNAPSIZE with the Android display metrics and apply the correct device dependent multiplier. This ensure the ESnap box will have the same size on all devices.

...

Code Block
// Get main selection
CFxSelectionSet* pFxSelSet = pCmdCtx->GetFxDocument()->GetFxMainSelectionSet();

// Construct resbuf with (dxf code - value) pairs to filter object for selection. Filter works as white-list.
fdt_resbufW *pFilter = pCmdCtx->GetFxDocument()->GetFxAPI()->fdt_buildlistW(
            RTDXF0, "CIRCLE", // Set DXF-name
            8, "MYLAYER",    // Set layer name
            0 );                         // Termination 0

// Do select with filter.
pCmdCtx->GetFxDocument()->GetFxUserIO()->DoSSGet( CFxUserIO::eFilter, // Set filter mode
                                                  pFxSelSet, CFxUserIO::eKwSSGet, L"", L"",
                                                  pFilter, // Set filter
                                                  0 );

// Release filter
pCmdCtx->GetFxDocument()->GetFxAPI()->fdt_relrbW( pFilter );

...

How to change entity snap settings?
Status
colourYellow
titleC++

The entity snap settings are a system controlled value (OSMODE) and can be changed or read via C++ as follow:

Code Block
GetFxSystemServices()->GetHostAppServices()->setOSMODE( YOUR_OSMODE );
GetFxSystemServices()->GetHostAppServices()->getOSMODE();


The value is a bit combination that can be constructed by the values in the table down below:

Type

Value

Clear

0

Endpoint

1

Midpoint

2

Center

4

Node

8

Quadrant

16

Intersection

32

Insertion

64

Perpendicular

128

Tangent

256

Nearest

512

Apparent

2048

Extension

4096

Parallel

8192

All set

16383 (Combined)

Hint: To get the correct value for combined bits, OSMODE system variable can be also checked with ARES Commander. Type OSMODE in the command line to read the current entity snap settings value.