Hi,
There are some no. of points. I want to publish each one of them thru Macro. This is a code which i am using. But the problem is that all the points are being published at once i.e one publication contains all the points.(Rather all the points are being highlighted when we select the publication in the publication window). Please let me know where I am going wrong.
For PointCount = 1 To oPart.Bodies.Item(1).HybridShapes.Count
Dim RefStrP As String
RefStrP = oProdDocu.Product.Name + "/" + oProduct.Name + "/!" + oPart.Bodies.Item(1).HybridShapes.Item(PointCount).Name
Dim PointRef As Reference
Set PointRef = oProdDocu.Product.CreateReferenceFromName(RefStrP)
Dim PubName As String
PubName = oPart.Bodies.Item(1).HybridShapes.Item(PointCount).Name + CStr(PointCount)
Dim ThePublication As Publication
Set ThePublication = oPublications.Add(PubName)
oPublications.SetDirect PubName, PointRef
Dim settingControllers1 As SettingControllers
Set settingControllers1 = CATIA.SettingControllers
Dim visualizationSettingAtt1 As VisualizationSettingAtt
Set visualizationSettingAtt1 = settingControllers1.Item("CATVizVisualizationSettingCtrl"
visualizationSettingAtt1.SaveRepository
Next PointCount |