cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Using VB to change the color of a surface

Newbie

Using VB to change the color of a surface

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

End Function



Thanks in advance.

1 REPLY 1

RE: Using VB to change the color of a surface

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:


mapkey _sc ~ Select `main_dlg_cur` `ProCmdViewGallery.view`;\
mapkey(continued) ~ Select `main_dlg_cur` \
mapkey(continued) `ProCmdViewGallery_layoutph.palette_holder.myAppPalette.NamesList`1 `r1`;\
mapkey(continued) ~ Timer `UI Desktop` `UI Desktop` `Gallery_UI_Timer`;\
mapkey(continued) ~ Close `main_dlg_cur` `ProCmdViewGallery.view`;



Hope this helps.


Andreas


__________________________________


Andreas Hellmann
MCAD Services Pro/E & Pro/E customization
Am Wartfeld 7
D-61169 Friedberg


phone: +49 151 21259910
mail: -