/*--------------------------------------------------------------------------------------+ | | $RCSfile: publicfile.h,v $ | $Revision: 1.0 $ | $Date: 2001/01/31 19:25:21 $ | | Copyright (c) 2001; Bentley Systems, Inc., 685 Stockton Drive, | Exton PA, 19341-0678, USA. All Rights Reserved. | | "MicroStation" and "MDL", are trademarks of Bentley Systems, Inc. | | | Limited permission is hereby granted to reproduce and modify this | copyrighted material provided that the resulting code is used only | in conjunction with Bentley Systems products under the terms of the | license agreement provided therein, and that this notice is retained | in its entirety in any such reproduction or modification. | +--------------------------------------------------------------------------------------*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /*----------------------------------------------------------------------+*//** * !!!Describe Function Completely!!! * * * * * @param nameOfParam !!!what this parameter means * * @return !!!what the return value means * * * * Author: Mark.Anderson 10/07 * * * +----------------------------------------------------------------------*/ Public int GetSelectedRefFile ( ) { RawItemHdr *rihP; ListModel *listModelP; ListCell *listCellP; int i; long longValue = NULL; MdlDesc *refDesc = NULL; char appName[16]; DialogBox *refFileDBP; DialogItem *diP; int nSelections; Point2d *selectionsP; if (refDesc = mdlSystem_findMdlDesc("Ref")) // Should I not use "Ref"? What should I use for the reference dialog? printf("refDesc obtained\n"); sprintf (appName, "%s", mdlSystem_getMdlTaskID (refDesc)); printf ("appName: %s\n", appName); if (refFileDBP = mdlDialog_find (-7, refDesc)) { printf("Dialog box found\n"); // mdlDialog_itemsSynch (refFileDBP); } // else // mdlDialog_open (refDesc, -7); if (diP = mdlDialog_itemGetByTypeAndId (refFileDBP, RTYPE_ListBox, LISTID_ReferenceFile, 0)) printf("Dialog item found\n"); rihP = diP->rawItemP; if (listModelP = mdlDialog_listBoxGetListModelP(rihP)) printf("List Model pointer obtained\n"); mdlDialog_listBoxGetSelectionsX(&nSelections,&selectionsP,rihP); for (i=0;i