Imports the indicated resource from the specified list to the current file, if it is not already in the current file, and returns the handle to the resource.
FUNCTION ImportResourceToCurrentFile(
listID : LONGINT;
index : LONGINT): HANDLE;def vs.ImportResourceToCurrentFile(listID, index):
return HANDLE| Name | Type | Description |
|---|---|---|
| listID | LONGINT | an ID for a resource list created by the BuildResourceList and BuildResourceListN command. |
| index | LONGINT | an index into the list. |
ELSE IF shouldUseExisting THEN BEGIN
IF selSymFolder = GetPluginString(4012) THEN BEGIN { symbol is in a defaults document }
choiceNum := GetImagePopupSelectedItem(selectSymbol, kSyms);
IF choiceNum <= defaultListCount THEN
symHandle := ImportResourceToCurrentFile(defaultListID, choiceNum)
ELSE
symHandle := ImportResourceToCurrentFile(defaultListID2, choiceNum-defaultListCount);
IF symHandle <> NIL THEN
symName := GetName(symHandle);
END
BEGIN
h := ImportResourceToCurrentFile(ResourceListID, I);
ImportedMarker1 := TRUE;
END
BEGIN
resourceH := ImportResourceToCurrentFile( defConListID, cnt );
PIOHand := FInSymDef( resourceH );
gSymbolInfo [cnt].shapeName := GetName( GetRecord ( PIOHand, (NumRecords(PIOHand))) );
gSymbolInfo[cnt].deleteMe := TRUE;
gSymbolInfo[cnt].symbolName := GetSDName( resourceH );if vs.GetObject( strMarkerName ) == None:
hResult = vs.ImportResourceToCurrentFile( hResourceListID, index )
bMarkerImported = TrueVS Functions: ImportResToCurFileN | BuildResourceList |BuildResourceListN
Availability: from VectorWorks12.0