Search code examples
vbacatia

VBA Publication in CATIA


How do I do a publication on a part? I used the following code and either get the "The Method CreateReferenceFromName Failed" or "This object doesn't support this property or method" error in return.

Set partDocument1 = CATIA.ActiveDocument

Set product1 = partDocument1.GetItem("PART1")

Set reference1 = product1.CreateReferenceFromName("PART1\Properties\DASH NUMBER")

Solution

  • The answer ended up being longer than anticipated.

    I used the same code above but had to publish parameters and relationships to link the user defined properties to a publishable asset. This is the only way I was able to create this connection.