-
1
- #1
Sidtha
Aerospace
- Nov 25, 2012
- 30
Dear All,
I want insert an STD part inside a product using vba please help me for it.
---First need to create a new product using insert new product name should be (STD_parts)
---After this need call STD parts from the local folder and positioned in a product.
Parts should be place using excel co ordinates like below.
PartNumber Fasteners Diameter Type Xe Ye Ze Xdir Ydir Zdir
D5724085500000 Fasteners Diameter_0.313_(5/16")_|_7.9mm en6114K5-12.263 4821.16mm 3237.365mm 194.177mm -0.033227856 0.058947539 -0.997707922
D5724085500000 Fasteners Diameter_0.313_(5/16")_|_7.9mm en6114K5-12.264 4858.672mm 3251.013mm 193.735mm -0.033599881 0.05992018 -0.997637519
i have recorded below macro but unable to edit that.
Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim products1 As Products
Set products1 = product1.Products
Dim product2 As Product
Set product2 = products1.Item("D0005039219800.1")
Dim products2 As Products
Set products2 = product2.Products
Dim product3 As Product
Set product3 = products2.Item("D5724085500000.1")
Dim products3 As Products
Set products3 = product3.Products
Dim product4 As Product
Set product4 = products3.AddNewProduct("STD_parts")
I want insert an STD part inside a product using vba please help me for it.
---First need to create a new product using insert new product name should be (STD_parts)
---After this need call STD parts from the local folder and positioned in a product.
Parts should be place using excel co ordinates like below.
PartNumber Fasteners Diameter Type Xe Ye Ze Xdir Ydir Zdir
D5724085500000 Fasteners Diameter_0.313_(5/16")_|_7.9mm en6114K5-12.263 4821.16mm 3237.365mm 194.177mm -0.033227856 0.058947539 -0.997707922
D5724085500000 Fasteners Diameter_0.313_(5/16")_|_7.9mm en6114K5-12.264 4858.672mm 3251.013mm 193.735mm -0.033599881 0.05992018 -0.997637519
i have recorded below macro but unable to edit that.
Dim productDocument1 As ProductDocument
Set productDocument1 = CATIA.ActiveDocument
Dim product1 As Product
Set product1 = productDocument1.Product
Dim products1 As Products
Set products1 = product1.Products
Dim product2 As Product
Set product2 = products1.Item("D0005039219800.1")
Dim products2 As Products
Set products2 = product2.Products
Dim product3 As Product
Set product3 = products2.Item("D5724085500000.1")
Dim products3 As Products
Set products3 = product3.Products
Dim product4 As Product
Set product4 = products3.AddNewProduct("STD_parts")