PrismMapInfo() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns properties of a Prism Map window. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

PrismMapInfo( window_id, attribute )

window_id is an integer window identifier.

attribute is an integer code, indicating which type of information should be returned.

Return Value

Float, logical, or string, depending on the attribute parameter.

Description

The PrismMapInfo() function returns information about a Prism Map window.

The window_id parameter specifies which Prism Map window to query. To obtain a window identifier, call the FrontWindow() function immediately after opening a window, or call the WindowID() function at any time after the window's creation.

There are several numeric attributes that PrismMapInfo() can return about any given Prism Map window. The attribute parameter tells the PrismMapInfo() function which Map window statistic to return. The attribute parameter should be one of the codes from the following table; codes are defined in MAPBASIC.DEF.

Attribute ID Return Value
PRISMMAP_INFO_SCALE 1 Float result representing the PrismMaps scale factor.
PRISMMAP_INFO_BACKGROUND 4 Integer result representing the background color, see RGB() function.
PRISMMAP_INFO_LIGHT_X 6 Float result representing the x-coordinate of the light in the scene.
PRISMMAP_INFO_LIGHT_Y 7 Float result representing the y-coordinate of the Light in the scene.
PRISMMAP_INFO_LIGHT_Z 8 Float result representing the z-coordinate of the Light in the scene.
PRISMMAP_INFO_LIGHT_COLOR 9 Integer result representing the Light color, see RGB() function.
PRISMMAP_INFO_CAMERA_X 10 Float result representing the x-coordinate of the Camera in the scene.
PRISMMAP_INFO_CAMERA_Y 11 Float result representing the y-coordinate of the Camera in the scene.
PRISMMAP_INFO_CAMERA_Z 12 Float result representing the z-coordinate of the Camera in the scene.
PRISMMAP_INFO_CAMERA_FOCAL_X 13 Float result representing the x-coordinate of the Cameras FocalPoint in the scene.
PRISMMAP_INFO_CAMERA_FOCAL_Y 14 Float result representing the y-coordinate of the Cameras FocalPoint in the scene.
PRISMMAP_INFO_CAMERA_FOCAL_Z 15 Float result representing the z-coordinate of the Camera's FocalPoint in the scene.
PRISMMAP_INFO_CAMERA_VU_1 16 Float result representing the first value of the ViewUp Unit Normal Vector.
PRISMMAP_INFO_CAMERA_VU_2 17 Float result representing the second value of the ViewUp Unit Normal Vector.
PRISMMAP_INFO_CAMERA_VU_3 18 Float result representing the third value of the ViewUp Unit Normal Vector.
PRISMMAP_INFO_CAMERA_VPN_1 19 Float result representing the first value of the View Plane Unit Normal Vector.
PRISMMAP_INFO_CAMERA_VPN_2 20 Float result representing the second value of the ViewPlane Unit Normal Vector.
PRISMMAP_INFO_CAMERA_VPN_3 21 Float result representing the third value of the ViewPlane Unit Normal Vector.
PRISMMAP_INFO_CAMERA_CLIP_NEAR 22 Float result representing the cameras near clipping plane.
PRISMMAP_INFO_CAMERA_CLIP_FAR 23 Float result representing the cameras far clipping plane.
PRISMMAP_INFO_INFOTIP_EXPR 24 String for Infotip. Not previously documented.

Example

This example prints out all the state variables specific to the PrismMap window:

include "Mapbasic.def"
Print "PRISMMAP_INFO_SCALE: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_SCALE)
Print "PRISMMAP_INFO_BACKGROUND: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_BACKGROUND)
Print "PRISMMAP_INFO_UNITS: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_UNITS)
Print "PRISMMAP_INFO_LIGHT_X : " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_LIGHT_X )
Print "PRISMMAP_INFO_LIGHT_Y : " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_LIGHT_Y )
Print "PRISMMAP_INFO_LIGHT_Z: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_LIGHT_Z)
Print "PRISMMAP_INFO_LIGHT_COLOR: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_LIGHT_COLOR)
Print "PRISMMAP_INFO_CAMERA_X: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_X)
Print "PRISMMAP_INFO_CAMERA_Y : " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_Y )
Print "PRISMMAP_INFO_CAMERA_Z : " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_Z )
Print "PRISMMAP_INFO_CAMERA_FOCAL_X: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_FOCAL_X)
Print "PRISMMAP_INFO_CAMERA_FOCAL_Y: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_FOCAL_Y)
Print "PRISMMAP_INFO_CAMERA_FOCAL_Z: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_FOCAL_Z)
Print "PRISMMAP_INFO_CAMERA_VU_1: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_VU_1)
Print "PRISMMAP_INFO_CAMERA_VU_2: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_VU_2)
Print "PRISMMAP_INFO_CAMERA_VU_3: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_VU_3)
Print "PRISMMAP_INFO_CAMERA_VPN_1: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_VPN_1)
Print "PRISMMAP_INFO_CAMERA_VPN_2: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_VPN_2)
Print "PRISMMAP_INFO_CAMERA_VPN_3: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_VPN_3)
Print "PRISMMAP_INFO_CAMERA_CLIP_NEAR: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_CLIP_NEAR)
Print "PRISMMAP_INFO_CAMERA_CLIP_FAR: " + PrismMapInfo(FrontWindow(), 
PRISMMAP_INFO_CAMERA_CLIP_FAR)

See Also:

Create PrismMap statement, Set PrismMap statement