Narelle Posted April 4, 2023 Share Posted April 4, 2023 Hi All Just trying to create an existing tree schedule with images of Trees, is there a method to insert the JPEGs as either an image resource or BITMAP and attach this to the existing Tree Symbol so it appears in the schedule? Quote Link to comment
Jeff Prince Posted April 5, 2023 Share Posted April 5, 2023 This would be a great feature to have. Quote Link to comment
Narelle Posted April 5, 2023 Author Share Posted April 5, 2023 Am thinking if we could import the jpeg as a bitmap and name the object acording to the tree number we could link the two in worksheets to get the image in the applicable row. Is there a code/function that can be used to identify the same text? Quote Link to comment
Pat Stanford Posted April 8, 2023 Share Posted April 8, 2023 The closest work around you are going to get is to use a Worksheet Script and make the images symbols. Make a new Vectorscript from the script below and name it ReturnSymbolImage. The script takes the Record and Field name that hold a symbol name and returns an image of that symbol to the worksheet. If you import you images and make symbols that are names with the Existing Tree number you should get what you are looking for. The worksheet formula would be: =RunScript('ReturnSymbolImage','Existing Tree','Tree No') You can use any Record.Field combination that is attached to the object in the database subrow to hold the symbol name. For example if you wanted to have both Summer and Winter images you could store the symbol names in the Field9 and Field10 fields of the Existing Tree record and then just change the last piece of text in the above formula to 'Field9' or 'Field10' as appropriate. Or put them in different columns and use both. Procedure ReturnSymbolImage; {©2023 Pat Stanford - pat@coviana.com} {licensed under the Boost Software License 1.0} {https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt} {TL/DR Use as you want, attribution for source, No warranty} {Takes the user supplied Record and Field names} {and returns and image of the symbol name contained} {in the field to the database cell for the Object} {the record is attached to} Var H1, H2 :Handle; S1 :String; BEGIN H2:=WSScript_GetObject; S1:=GetRField(H2, WSScript_GetPrmStr(0), WSScript_GetPrmStr(1)); H1:=GetObject(S1); WSScript_SetResImage(H1); End; Run(ReturnSymbolImage); Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.