drelARCH Posted March 2, 2023 Share Posted March 2, 2023 Hello, Is it possible for graphic legend based on material name to include information like material description, mark, keynote ... We have tried with worksheet function: #WS_MATERIALPROPERTY('MaterialKeynote')# but it is not working. Is there a way to extract these type of data? Any suggestions much apreciated. 2 Quote Link to comment
Anders Blomberg Posted March 4, 2023 Share Posted March 4, 2023 I'm very much interested in the same! I noticed in a short presentation of the tool that they had a legend with some additional properties added to cells so I guess it's possible? 1 Quote Link to comment
Pat Stanford Posted March 4, 2023 Share Posted March 4, 2023 #WS_MaterialProperty# Does note seem to work in Graphical Legends. My guess is that the object type that is actually being reported is not a Material, but something else, so the primary object does not have material properties. #WS_MATPROPERTYBYNAME(MaterialName,'MaterialKeynote')#. Does work. I also tested Description and Mark. 3 Quote Link to comment
Tom W. Posted March 5, 2023 Share Posted March 5, 2023 18 hours ago, Pat Stanford said: #WS_MaterialProperty# Does note seem to work in Graphical Legends. My guess is that the object type that is actually being reported is not a Material, but something else, so the primary object does not have material properties. #WS_MATPROPERTYBYNAME(MaterialName,'MaterialKeynote')#. Does work. I also tested Description and Mark. I am very new to Graphic Legends. Trying them out for first time really. #WS_MATPROPERTYBYNAME(MaterialName,'MaterialDescription')# works if Filter by Viewport... isn't enabled but as far as I can tell this results in the legend returning all the Materials used by objects in the file rather than the specific ones I'm interested in. I can go through + make the unwanted cells invisible but is there a way to return the Description field for just the Materials in a particular VP? Thanks Quote Link to comment
Pat Stanford Posted March 5, 2023 Share Posted March 5, 2023 @Tom W. Filtering by Viewport worked find for me. Did you actually put a check mark in the Use column of the dialog box. When I do, I only get the materials showing inside the crop of that viewport. Do you need to add a Crop object to your viewport? Or adjust your crop so that it does not touch objects you don't want in the legend? 1 Quote Link to comment
Tom W. Posted March 5, 2023 Share Posted March 5, 2023 (edited) 1 hour ago, Pat Stanford said: Did you actually put a check mark in the Use column of the dialog box. Yes absolutely. 1 hour ago, Pat Stanford said: Do you need to add a Crop object to your viewport? Or adjust your crop so that it does not touch objects you don't want in the legend? There are no other objects within the VP crop + the objects in my VP are not touching any other objects. This is my VP + accompanying Graphic Legend with 'Filter by Viewport' disabled: The Legend displays not only the Materials assigned to the Wall but all the other Materials which are applied to objects in the file. When I enable 'Filter by Viewport' I get this: The number of Materials now shown is correct (i.e. they relate to the Walls) but I lose the Description text. In contrast, if I change the dynamic text for the Legend to #MATERIAL# + repeat the exercise, I get this when 'Filter by Viewport' is disabled: i.e. all the Materials again. And this when it's enabled: i.e. just the Wall Materials but also the text so now it works as expected. Could it be related to the fact the VP is of a Wall + the Materials are assigned to components within that Wall? I have just tried with Extrudes instead + it works fine so I guess it is...: Although one of the images is displaying incorrectly for some reason, not sure why that is... Because it's a Tile??? 🤨 Edited March 5, 2023 by Tom W. Quote Link to comment
Anders Blomberg Posted March 5, 2023 Share Posted March 5, 2023 On 3/4/2023 at 6:09 PM, Pat Stanford said: #WS_MaterialProperty# Does note seem to work in Graphical Legends. My guess is that the object type that is actually being reported is not a Material, but something else, so the primary object does not have material properties. #WS_MATPROPERTYBYNAME(MaterialName,'MaterialKeynote')#. Does work. I also tested Description and Mark. Thanks @Pat Stanford. No luck for me with this one though. I use the exact phrase in your screenshot but get nothing at all out of it. Am I supposed to modify the text somehow? This one works for both attributes and objects? On a side note, I find this type of workflow a little to much coding-esque for my knowledge. Is it possible to get the same result in more of a clicking on stuff-workflow? Quote Link to comment
Pat Stanford Posted March 5, 2023 Share Posted March 5, 2023 Are you trying in VW2022 or 2023? I think that worksheet function may have been added in VW2023. And no there is not click around option. That Worksheet Function does not appears in the Dynamic Text Editor. It would be a good wish to have more WS functions added to the Dynamic Text editor. Quote Link to comment
Anders Blomberg Posted March 6, 2023 Share Posted March 6, 2023 21 hours ago, Pat Stanford said: VW2022 or 2023? 2023 SP3. Quote Link to comment
Pat Stanford Posted March 8, 2023 Share Posted March 8, 2023 If this is still a problem post or send me an example file with some materials and your graphic legend and I will take a look. 1 Quote Link to comment
Pat Stanford Posted March 9, 2023 Share Posted March 9, 2023 @Anders BlombergThe formula seems to work fine when opened in my version of VW2023. Some of your Materials need to be edited to include the proper data. You have the Pats Syntax field in the Graphical Legend set to display the Material Mark. Several of the Materials in the file do not have their Mark Set. For Stenmjöl MT the Mark field is not defined so the Dynamic Text is returning a blank field. I am assuming that the same is true of the other materials not showing their mark also. HTH Quote Link to comment
Anders Blomberg Posted March 14, 2023 Share Posted March 14, 2023 What a weird thing, I added text to only a few of the material marks to try it out but my legend doesn't return anything in any of the cells in the legend, whether they have something in the mark field or not. Looks as below. But you get the mark field for the materials where the mark is present? Quote Link to comment
Tom W. Posted March 14, 2023 Share Posted March 14, 2023 Maybe post a file demonstrating what's happening? Quote Link to comment
Anders Blomberg Posted March 14, 2023 Share Posted March 14, 2023 Sure thing, posted it privately earlier, but here it is in all its glory 🙂 1357465350_MaterialGL.vwx Quote Link to comment
Tom W. Posted March 14, 2023 Share Posted March 14, 2023 Thanks. I'm not really sure why but just by opening the Define Dynamic Text dialog for the PAT'S SYNTAX text + closing it again seems to reset things + the Mark fields display in the legend: Quote Link to comment
Anders Blomberg Posted March 14, 2023 Share Posted March 14, 2023 Strange things! That is how I expected it to look but I just won't get the Mark to appear. Just updated to SP4 and still have the same issue. Quote Link to comment
Tom W. Posted March 14, 2023 Share Posted March 14, 2023 What even if you go in + pretend to edit the formula? What happens if you add another formula underneath e.g. #WS_MATPROPERTYBYNAME(MaterialName,'MaterialDescription')#? Can you get Description text to show up? Quote Link to comment
Anders Blomberg Posted March 14, 2023 Share Posted March 14, 2023 Still nothing. I added the Description formula in both the original Description, in Pat's syntax as well as in a new dynamic text field. Nothing anywhere. Quote Link to comment
Tom W. Posted March 14, 2023 Share Posted March 14, 2023 Weird. What happens when you open my version of the file which should look like this: 1357465350_MaterialGL_Tom test.vwx Quote Link to comment
Anders Blomberg Posted March 14, 2023 Share Posted March 14, 2023 Found it! Pasted your (working) text into my dynamic text and found the issue. Changed "," to ";" and now it works. Not blaming anyone but that initial "," came from copying Pat's string of text above. Don't know of this might differ between regional versions of the software? I'm in Sweden, if that matters. 1 Quote Link to comment
Anders Blomberg Posted March 14, 2023 Share Posted March 14, 2023 Oh, and also, I never understood how to construct these formulas when they're not available by clicking. How do you find these mystical pieces of text? Quote Link to comment
Tom W. Posted March 14, 2023 Share Posted March 14, 2023 I think it is a comma (,) some places + semi-colon (;) others depending on geographical location or language or operating system? I don't know exactly but someone else will explain. The main thing is I am a comma/, person like Pat but my formula must have got translated when sent to you, whereas prior to that you were just copying + pasting the foreign text from here. This is what it looks like for me: So now you know: when you see a comma, replace it with a semi-colon! 1 Quote Link to comment
Tom W. Posted March 14, 2023 Share Posted March 14, 2023 11 minutes ago, Anders Blomberg said: Oh, and also, I never understood how to construct these formulas when they're not available by clicking. How do you find these mystical pieces of text? See developer pages for list of worksheet functions: https://developer.vectorworks.net/index.php?title=Worksheet_Functions 2 Quote Link to comment
rDesign Posted March 14, 2023 Share Posted March 14, 2023 13 minutes ago, Tom W. said: I think it is a comma (,) some places + semi-colon (;) others depending on geographical location or language or operating system? I don't know exactly but someone else will explain Found this right at the top of that developer Worksheet Functions page you linked: Quote Disclaimer All function descriptions below use US notation. In European notation, the decimal "." should be "," and the separator "," should become ";". Thanks for posting that link by the way, I forget that pages like that exist. 2 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.