How to access a mesh fill's nodes in VBA macro code
Objective is to be able to cycle thru all the nodes of a mesh fill in a for each loop.
Mesh Fill is not currently supported with VBA
Is there a way to set a Halftone Dot Frequency: 30, Angle: 30 Degrees with VBA code?
Have you tried to record a macro while doing those steps manually?
If yes, did you got a hardly understandable string-assign?
This String assign is a kind of JSON-text where all possible parameters for this kind of fill or any other item are listed.
I had to do this recently where I had to add some intermediate colours to a fill object. With OutLine = CurShape.Style.GetPropertyAsString("fill") I got the JSON-description for the fill. There is a part inside where the 'intermediateColors' are defined. I inserted my definition there and wrote this then back to the shape with CurShape.Style.SetPropertyAsString "fill", OutLine.
This set the values like expected.
One very useful trick I used to understand what I need to do, was:
After I had stored the value from the shape in my 'OutLine' I added the following command in my VBA-Code: InputBox "Here", , OutLine. After this box came up, I copied the default value from the box to the clipboard and pasted it into my NotePad++. Then I could clearly read the content of 'OutLine' and saw, how to replace the parameters to the values I need.
I know, it's not the easiest way and it requires a lot of work and tools to do the replacement of variables, but if you are familiar with JSON and maybe have already some tools it might be worth to have a closer look to this.
Yes I have seen this and I attempted to work with it before. It could be a workable solution if I had an easy way to generate the default JSON without the changes I need to make. What I mean is the JSON of the existing object in its current state. If I could get that, then yes, this would work for me. Otherwise, it seems almost impossible to get all of the variables just right in the json since we don't know the full structure.
Let me know, if you succeded