Hope this hasn't been covered...I found lots of toolkit but no VB.
Is it possible to change the color of a surface using VB/VBA?
I've (I think) managed to "get hold" on the surfaces using this:
Private Function GetSurfaces(ByRef model As IpfcModel) Dim surfaces As IpfcModelItems Dim numSurfaces As Double
Thanks in advance.
This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
There is no API function in VB or Weblink. Available in Toolkit only.
Perhaps you might try this:
Add all your surfaces to the SelectionBuffer with IpfcSelectionBuffer.AddSelection().
Then run a macro/mapkey with session.RunMacro().
You might have colors defined in your environment and these colors have a NAME, for example "r1", so this mapkey executed after adding surface selections to the selection buffer willassignthe color r1 to the surfaces: