So no short hand for the csv embed points or the range of embed points?
I just wanted to check if I was doing something wrong.
Edit.
So the crux of the problem is there is no way of adding a #Code template to a specific embed in the embed editor and whilst the #At(%EmbedPoint) can force code to be generated at the correct embed, having a #Code template on the wrong embed but generating code at the right embed can cause confusion when looking at this in the embed editor.
I’ve tried various things inside #Restrict/#EndRestrict, but there’s no way of getting the hilighted embed in the embed editor.
So I’ve opted to use a procedure #Extension to add comments/#Prompts and new embeds to the specific parent embed which has the HIDE attribute for a work around.
Its not ideal but it works.
The only other idea I havent tried is rehashing the embed info template, theres a template called ProcBind.tpw with a group which looks promising. #Group(%ProcedureAutoBindShowWrongEmbed)
Edit2.
I think I have found a hack using #Error to get %EmbedID and then put it into #Group with a return string that tells the user to just click OK and then I can get the hilighted embed point out of the embed editor. And then I can get #Restrict to work
Didnt need to use the #Error hack to get the %EmbedID. It seems when my dev computer was online %EmbedID wasnt working, but now its offline it is, so this code below works as a replacement for #Where()
Single Embed Point:
#Code(CodeTemplateName,'Description for Code Template Name')
#Restrict,Where(%EmbedID = '%SomeEmbedIdentifier'))
#Accept
#EndRestrict
Or it can be expanded to a group to gain a bit more of the functionality of #Where()
Havent figured out how I can loop through all the %EmbedID’s in order though.
I seem to recall Windows only allows upto 32 params, but I’ve got 40 params declared in the group without complaint.
Anyway if you select an embed in the embed editor and then click Insert to select a template, #Code templates which can work on the hilighted embed will now appear in the list.
This is instead of showing all #Code templates which were not for the hilighted embed in the embed editor.
That code was from 11.0 but they have shipped since at least 9.0.
I think to have Web Builder installed during the Setup you have tick a box and probably choose a custom install to see that box. I don’t use WB but often find some interesting stuff in the code. For awhile new features were added to implement WB.