pdfSet3DAnnotProps
Configure a 3D annotation's activation/deactivation behavior
BOOL32 __stdcall pdfSet3DAnnotProps(PPDF IPDF, uint32_t Annot, int32_t ActType, int32_t DeActType, int32_t InstType, int32_t DeInstType, BOOL32 DisplToolbar, BOOL32 DisplModelTree);
BOOL32 __stdcall pdfSet3DAnnotScriptA(PPDF IPDF, uint32_t Annot, const char* Value, uint32_t Len);
function pdfSet3DAnnotProps(const IPDF: PPDF; Annot: Cardinal; ActType, DeActType, InstType, DeInstType: Integer; DisplToolbar, DisplModelTree: LongBool): LongBool; stdcall;
function pdfSet3DAnnotScriptA(const IPDF: PPDF; Annot: Cardinal; const Value: PAnsiChar; Len: Cardinal): LongBool; stdcall;
Purpose. Configure a 3D annotation's activation/deactivation behavior (/3DA — when the 3D view activates/deactivates and whether it's instantiated/uninstantiated then) and toolbar/model-tree UI visibility (pdfSet3DAnnotProps); attach a 3D-view JavaScript "on instantiate" script (pdfSet3DAnnotScript).
Description. pdfSet3DAnnotScript's Len is honored when both Value is non-null and Len > 0 (an explicit-length copy, allowing embedded nulls in the script text); otherwise it falls back to treating Value as a plain null-terminated C string. This is a real, length-aware code path, not a dropped parameter.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Annot | Document-wide 3D-annotation handle. |
ActType, DeActType, InstType, DeInstType | Activation/deactivation/instantiation trigger codes. |
DisplToolbar, DisplModelTree | UI chrome visibility flags. |
Value, Len | *(Script only)* Script source; Len enables embedded-null-safe copying when > 0. |
Return value. True if Annot resolves to a 3D annotation; False otherwise.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSet3DAnnotProps
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.