×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Catia V5 - Points to Spheres

Catia V5 - Points to Spheres

Catia V5 - Points to Spheres

(OP)
Hello All,
I have excel sheets from which i have inported the point coords. now i need to draw a sphere on each of these points. i have around 35 files with an average of 350 points in each. any body know of a macro or any other quick way of creating or copying a sphere to all these points?

Thanks in advance,
Gary.

RE: Catia V5 - Points to Spheres

Gary,
  If you have a KWA license you can fill a list of all the points then loop that list and create a sphere at the point.

Regards,
Derek
 

RE: Catia V5 - Points to Spheres

Sounds possible to do with a macro but haven't tried it. If you get your points into the part(think there are some macros available on different forums) then you need PKT (Product Knowledge Template), the loop(still existing in KWA) has been replaced by the Knowledge Pattern in PKT and to loop non datum geometry you need an UDF. In short you need to create an UDF, and under the type tab crate a gscript and then store in an ARM catalog. The you create a Knowledge Pattern where you collect all the points with a list and add the UDF on them.

Knowledge approach has some benefits it will update if there are changes. If you go with the macro, that creates points from excel, check the code, you could maybe add the sphere operation there.
 

RE: Catia V5 - Points to Spheres

(OP)
Hi Guys,
Thanks for your input, but it is all over the top for me. Any guidelines on how to do these procedures?

RE: Catia V5 - Points to Spheres

Do you have access to either KWA(Knowlesge Advisor) or PKT(Product Knowledge Templates)?

So where are you standing right now? Can you get the points into CATIA?

RE: Catia V5 - Points to Spheres

(OP)
I have a macro which i can use to import the points from csv to catia. the point all come in position and with their names. so from here onwards. i could make the macro available if it would help? i can go the PKT route.

RE: Catia V5 - Points to Spheres

I'm more into knowledgeware but we have people on the forum that could assist in scripting so publishing could help. So beside inporting the points from a csv table you want to create spheres. If you have PKT, not sure what you answered, I can help you set up a knowledge pattern.

RE: Catia V5 - Points to Spheres

(OP)

RE: Catia V5 - Points to Spheres

Ok, lets give it a try...

Before you do anything go to tools/option and in the knowledge enviroment tab define a path for the architect resource creation path. (this will create a folder structure needed when working with ARM)

Start by creating an UDF that makes a sphere, this udf should have one input and that should be a point, rename the input to "Point". In the last tab "type" hit auto and generate to generate a gscript that will be stored in the folder structure created previously. Now create a catalog, name it ARMCatalog and add the udf feature, create keyword "Logical Name" and set the value to "Sphere" and the keyword "Type" and set the value to "UserFeature". Store both the UDF part and catalog in the folder "knowledgeResourcesCatalogs" which you will find where you defined the knowledge enviroment earlier.

Now to create the knowledge pattern. You can if you want it to be generic to create a part with some points in it so you can define a the pattern and make a power copy that you can use later. In the knowledge pattern window start with creating a new list and call it SphereList. Add the code below:

let i(integer)

let PointList(list)
let ListSize(integer)

let Sphere(UserFeature)

/* Getting all point from Geometrical Set.1 in the list, PointList that will be used to create the UDF on one point at the time and setting the while loop */
PointList='Geometrical Set.1'.Query("Point","")
ListSize=SL->Size()


/* UDF instanciation, in the first line ARMCatalog is the name of the catalog found in the knowledge enviroment folder "knowledgeResourcesCatalogs" Sphere is the feature with the logical name, SphereSet is the name of the geometrical set where the udf should be created. Second line is to map the UDF inout parameter Point to the point on the list*/
i=1
For i while i <=ListSize  
{
    
    Sphere=CreateOrModifyTemplate("ARMCatalog|Sphere",SphereSet ,`Relations\KnowledgePattern\SphereList`  , i)
    Sphere->SetAttributeObject("Point",SphereList ->GetItem(i))
    EndModifyTemplate(Sphere)     
    i=i+1
}



Had to describe it on top of my head so it may not be perfect:)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources