Hi :)
I want do a MACRO VBA for make Publication on a Part....
It is oki for Publication a Point name "3-16 Point", with this code:
Public Sub pub_fasterners()
Dim sSel As Selection
Set sSel = CATIA.ActiveDocument.Selection
Dim partDocument1 As Document
Set partDocument1 = CATIA.ActiveDocument
' Transforme la Part en Product
Dim product1 As Product
Set product1 = partDocument1.GetItem(1)
Dim publications1 As Publications
Set publications1 = product1.Publications
sSel.Search ("Name:'3-16 Point 01';all")
MsgBox sSel.Item(1).Value.Name
Dim reference1 As Reference
Set reference1 = product1.CreateReferenceFromName("Part1/!3-16
Points/'3-16 Point 01")
' Set reference1 = sSel.Item(1).Reference ' Déprécié depuis
R14
Dim publication1 As Publication
Set publication1 = publications1.Add("3-16 Point 01")
publications1.SetDirect "3-16 Point 01", reference1
End Sub
But, if Point name is with a "/" as : "3/16 Point", the Reference no works, because he think / as lien command for separation... Soo, I don't know how I can do....
Thx.