Need to extract the points from design table in CATIA (please at least help me this time)
Need to extract the points from design table in CATIA (please at least help me this time)
(OP)
Could anyone please help me in creating a code for my following requirenment,
I have a geomtery which is driven by parameters (W,X,Y,Z). The parameters are extracted from excel. so for one set (I have around 200) of parameters I have one geomtery so, for 200 sets I have 200 geometries. Now I want to extract the points(different points) on a geometry for each of these sets. How can I do that in VB code? Any suggestions?
I was thinking of using design table to create all those sets and then use VB code to extract those points but no idea how I am going to do that, so any suggestions will work.......
Please help me............
I have a geomtery which is driven by parameters (W,X,Y,Z). The parameters are extracted from excel. so for one set (I have around 200) of parameters I have one geomtery so, for 200 sets I have 200 geometries. Now I want to extract the points(different points) on a geometry for each of these sets. How can I do that in VB code? Any suggestions?
I was thinking of using design table to create all those sets and then use VB code to extract those points but no idea how I am going to do that, so any suggestions will work.......
Please help me............





RE: Need to extract the points from design table in CATIA (please at least help me this time)
That would be the first step.
Then, like you said, with VB, go from one configuration to the next and get the required info.
Did you check the FAQ560-1377: XYZ of point to a text file , it might help???
Provide your code and your problem so we can help.
indocti discant et ament meminisse periti
RE: Need to extract the points from design table in CATIA (please at least help me this time)
This is my idea so,problably not a best way go (i don't know), if you have any other good way to solve this please let me know.
Here is my code
I am trying to Create a new Geometrical sets for each set of parameters (configuration) and trying to save each configuration and corresponding geometrical sets in the same file, so that I will have all together 200 geometrical sets:
let me know if you want me explain more.
Sub CATMain()
Dim partDocument1 As PartDocument
Set partDocument1 = CATIA.ActiveDocument
Dim part1 As Part
Set part1 = partDocument1.Part
Dim relations1 As relations
Set relations1 = part1.relations
For loopcount = 1 To 4
Dim designTable1 As DesignTable
Set designTable1 = relations1.Item("DesignTable.1")
designTable1.Configuration = loopcount
Dim hybridBodies1 As HybridBodies
Set hybridBodies1 = part1.HybridBodies
Dim hybridBody1 As HybridBody
Set hybridBody1 = hybridBodies1.Add()
hybridBody1.Name = ("Geometrical Set." & loopcount + 1)
Dim selection1 As Selection
Set selection1 = partDocument1.Selection
Dim selection2 As Selection
Set selection2 = partDocument1.Selection
selection1.Clear
Dim hybridBody2 As HybridBody
Set hybridBody2 = hybridBodies1.Item(1)
Dim praful1 As String
praful1 = hybridBody2.Name
selection1.Add hybridBody2
selection1.Copy
selection1.Clear
selection2.Add hybridBody1
selection2.Paste
part1.Update
Next
End Sub
RE: Need to extract the points from design table in CATIA (please at least help me this time)
You should:
go to first configuration
measure what you need
go to next configuration
you're almost there
not saying you need copy/paste in your code but if you want to use it check copy/paste from other thread like this one: thread560-347550: How to copy the Plane to New Geo Set
indocti discant et ament meminisse periti
RE: Need to extract the points from design table in CATIA (please at least help me this time)
1) get the geometrical set at first location (first set of parameters) (geometrical set I already created in CATIA)
2) run the loop to go to the second locations( second set of parameters)for second geometrical set
3) I want to repeat this for 200 times.
then I will create a guiding path
Let me know if you need more elaboration
RE: Need to extract the points from design table in CATIA (please at least help me this time)
Many times, a picture is worth then a million of words...
So, from this thread and from the older one, what should we understand, do you have different files in different locations, containing points coordinates? Do you want to create all those points and lines or curves in a single part file or in different part files and all those parts inserted in a CATProduct? How is looking the excel file ?
I believe you need to explain much more clear what you want and be aware that no one will give you a complete solution if this is requiring a lot of time to be solved (don't forget, there are a lot of companies earning good money from solving others problems).
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...
RE: Need to extract the points from design table in CATIA (please at least help me this time)
Thanks for explaining, I will keep that in mind, I did work around some script which might work for my work. But this is a great place to discuss VBA problems, thanks for response. I don't have internet access at my office..........
Could you guys please tell me how should I write the code for multisection loft. I have two curves in catia and want to connect those with loft using vb code. I did record macro, which I might be able to post tomorrow but it is not helping that much.
RE: Need to extract the points from design table in CATIA (please at least help me this time)
Regards
Fernando
https://picasaweb.google.com/102257836106335725208
https://picasaweb.google.com/103462806772634246699...