|
-
Aug 23rd, 2004, 12:46 PM
#1
Thread Starter
New Member
excel to catia
Hi All,
I recorded this macro from a CAD program, called CATIA. What it does is creates a point and a sphere. what i want it to do is to loop for as many rows in an an excel spreadsheet. the spreadsheet is where i get my x,y & z values for the point.
Does anyone know how to solve this problem. Thanks.
Language="VBSCRIPT"
Sub CATMain()
Set documents1 = CATIA.Documents
Set partDocument1 = documents1.Add("Part")
Set part1 = partDocument1.Part
Set hybridBodies1 = part1.HybridBodies
Set hybridBody1 = hybridBodies1.Add()
Set hybridShapeFactory1 = part1.HybridShapeFactory
Set hybridShapePointCoord1 = hybridShapeFactory1.AddNewPointCoord(0.000000, 0.000000, 0.000000)
hybridBody1.AppendHybridShape hybridShapePointCoord1
part1.InWorkObject = hybridShapePointCoord1
part1.Update
Set reference1 = part1.CreateReferenceFromObject(hybridShapePointCoord1)
Set hybridShapeSphere1 = hybridShapeFactory1.AddNewSphere(reference1, Nothing, 76.200000, -45.000000, 45.000000, 0.000000, 180.000000)
hybridShapeSphere1.Limitation = 1
hybridBody1.AppendHybridShape hybridShapeSphere1
part1.InWorkObject = hybridShapeSphere1
part1.Update
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|