Resource Container

From LabVIEW Wiki
Jump to: navigation, search

Resource Container file format is a most often used file format within LabVIEW ecosystem. It is a proprietary binary format defined by National Instruments and used in both LabVIEW and LabWindows/CVI. The format is strongly inspired by Mac OS Resource Fork format, as LabVIEW was originally created for that platform, and ported to other OSes later, at version 2.5.

The format is a container, storing a group of Resources. Resources have 4-character identifier assigned, and the 4-character identifier for the whole container is RSRC. Most files used by LabVIEW have that RSRC format, only the specific Resources stored inside are different. The files with that header include *.vi, *.ctl, *.mnu, *.llb, *.dlog, *.ctt, *.vit, *.uir, *.rsc, and many created with, or internally used by, LabVIEW.

The resources stored within have their identifiers often identical to those in Resource fork format, but many new ones are also introduced. Some resources have multiple variations, as their structure changed between versions of LabVIEW.

Known Resources

Below a few resources are listed. Note that the text names given for them are mostly informed guesses.

Resource ID Long Name Description
MUID Map Unique Identifier
FPSE Front Panel Size Estimate Optional resource which can be used to optimize memory allocation when loading the VI file. Contains one integer value, which seem be amount of tags within Front Panel Heap divided by 10. See also: BDSE.
FPTS Front Panel Tags Contains data for tags set on front panel objects using the Get Tag method.
FPTD Front Panel Type for DataLog
BDSE Block Diagram Size Estimate Optional resource which can be used to optimize memory allocation when loading the VI file. Contains one integer value, which seem be amount of tags within Block Diagram Heap divided by 10. See also: FPSE.
BDTS Block Diagram Tags Contains data for tags set on block diagram objects using the Get Tag method.
FLAG Integer flags
CONP Connector Port Type Map
CPTM Connector Port Type Map
CPC2 Connector Port Content Type v2
CPCT Connector Port Content Type
CPD2 Connector Port DI v2
CPDI Connector Port DI
DLGH Dialog HTML
ERRH Error HTML
HLPT Help Tag
MItm M. Item
NODH NOD HTML
NOEG NOEG String
STRG String description
TITL Title of the file
STR Short String / Input definition?
CPST C. P. Strings
DNm# D. Name Strings List
HDb# Help Database item
LST# Short Strings List
STR# Short Strings List
FDFL FDFL Strings
LIfp LinkObj Refs for Front Panel
LIbd LinkObj Refs for Block diagram
LIds LinkObj Refs for Data Space
LIvi LinkObj Refs for VI
DFDS Default Fill of Data Space
GCDI
BFAL
CGRS Conglomerate Resource
CPMp Connection Points Map
DLDR DL Data Record
DLLP DL Local Path
FTAB Font Table
HIST Changes History
HLPP Help Path
LPTH L. Path
HLPW Help Website URL
SCSR Syntax Checker Digest
DTHP Data Types for Heap
DSTM Data Space Type Map Stores table of Type descriptors which make up Data Space of the VI file. Used in LV 7.1 and older.
TM80 Data Space Type Map LV8.0+ Stores table of references to Type descriptors which make up Data Space of the VI file. The actual definitions of TDs are stored in VCTP block. Used in LV 8.0 and newer.
LVIN LabView Instrument General information about a saved VI file; definitely used in LV 4.0 and older, was replaced by LVSR at some point.
LVSR LabView Save Record General information about a saved VI file; replaced LVIN resource somewhere before LV 6.0. The size of this resource increases with LV version, but old data is always kept at the same offset (new fields are only added at end).
vers Version block Stores version of LV used to create the RSRC file.
PNGI PNG Image Stores a bitmap picture in PNG format.
MNGI MNG Image While PNGs become quite popular, their animated counterpart, MNG format, never really caught on.
ICON Icon 32x32 1bpp
ICN# Icon Large Double 32x64 1bpp Usually used to store one icon in two versions (ie. disabled and active).
ics# Icon Small 16x16 1bpp
CURS Cursor 16x34 1bpp Usually used to store one cursor in two versions (ie. disabled and active).
ics4 Icon Small 16x16 4bpp
icl4 Icon Large 32x32 4bpp
ics8 Icon Small 16x16 8bpp
icl8 Icon Large 32x32 8bpp
BDPW Block Diagram Password
LIBN Library Names
LVzp LabView Zipped Program tree A whole application compressed to ZIP file.
PRT Print settings
BNID B. N. Identifier
CNST Constant Node UID set
LPIN Loop Invariant Node UID set
NUID N. U. Identifier
SUID S. U. Identifier
VPDP VI Primitive Dependency Flags
BDHP Block Diagram Heap First version of Heap storage format, used to store components placed on Block Diagram.
FPHP Front Panel Heap First version of Heap storage format, used to store components placed on Front Panel.
BDHb Block Diagram Heap ver b Second version of Heap storage format, used to store components placed on Block Diagram.
FPHb Front Panel Heap ver b Second version of Heap storage format, used to store components placed on Front Panel.
BDHc Block Diagram Heap ver c Third version of Heap storage format, used to store components placed on Block Diagram.
FPHc Front Panel Heap ver c Third version of Heap storage format, used to store components placed on Front Panel.
BDHT Block Diagram Heap Text Used when Heap storage format is set to Verbose Tagged Text.
FPHT Front Panel Heap Text Used when Heap storage format is set to Verbose Tagged Text.
BDHX Block Diagram Heap XML Used when Heap storage format is set to XML.
FPHX Front Panel Heap XML Used when Heap storage format is set to XML.
RTSG Runtime Signature Guid
GCPR Generated Code Profiler settings
UCRF Uncompressed Resource File Used when files are added to RSRC, ie. within *.llb files.
CPRF 'Comp' Compressed Resource File Used when files are added to RSRC; very basic mask based compression.
ZCRF ZLib Compressed Resource File Used when files are added to RSRC; uses compression algorithm from popular Z-Lib library.
DLG3 Dialog Resource File
VCTP VI Consolidated Data Types Introduced in LV 8.0, stores all Type descriptors used within the file. Consists of a Zlib-compressed data block preceded by four bytes containing the length of the compressed data in big-endian.
VICD Virtual Instrument Compiled Data / VI Code Contains the machine code generated by LLVM compiler.
VITS Virtual Instrument Tag Strings Contains a VI's persistent tags. Tags are additional data which is attached to a VI and manipulated using private methods such as VI class/Tag.Set Tag on the VI object. Certain tags can affect LabVIEW's functionality; for example, Express VI source VI's have a "_Wizard" tag containing the path to the configuration dialog VI, and the matrix typedefs contain a "NI.LV.All.OperatorInfo1" tag which configures the special "operator overloading" effect they have.