×
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

How to put a file of points into CATIA from a file

How to put a file of points into CATIA from a file

How to put a file of points into CATIA from a file

(OP)
I have over 100 points that I need to put into catia that are in excel. Is there any way to input this other then by hand? Any help will be great!


tony

RE: How to put a file of points into CATIA from a file

look in the online DOC, search for: pointsplineloft

cut / past your XYZ points in this Excel file.

Have an Openbody / Geometricalset in your active CATPart.

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file

(OP)
Eric,

 I don't know how to open it up in Catia. I have the file.

my sample file is

point #    x    y    z
0    0    0    0
1    0    -8.485    1.217
2    0.914    -8.152    1.103
3    5.156    -3.91    0.233
4    0.914    0.333    -0.102
5    -1.996    -0.726    -1.895
6    -2.196    -9.284    -0.861
7    0.914    -8.152    -1.191
8    5.156    -3.91    -1.921
9    0.914    0.333    -2.171


i have it in excel how do i open it up in catia now?

thanks

tony

RE: How to put a file of points into CATIA from a file

(OP)
hey Eric,


 Sorry I just got it working. You have been great. Thanks for helping me.


thanks again
tony

RE: How to put a file of points into CATIA from a file

(OP)
Eric,

One more question is there a way to connect lines in the excel sheet.


thanks

tony

RE: How to put a file of points into CATIA from a file

Hi,

this excel file can also make splines ... In order to make lines or polyline you need to edit the macro in Excel and change some code.

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file

I am attempting the same thing (inputting points into Catia v5r13 from an excel file).  I searched for pointsplineloft and that turned up no results.  I want to use the points to make a spline, so anyone have a more detailed way of doing this?

greg

RE: How to put a file of points into CATIA from a file

Search the Help Documentation files for Create Elements from an external file, this will explain it all.

"PointSplineLoft" is an Excel file that can be downloaded from there and inside it, select Enable Macros. On the front Excel Sheet is some sample data. Select Tools => Macro => Macros, this will open a list of several Macros, select Feuil.Main.
Run that Macro and this appears;

Type in the kind of entities to create (1 for points, 2 for points and splines, 3 for points, spline and loft):

In the already opened CatPart the Points whose coordinates are on the front sheet will be created.

This has all been covered in this Forum, see Thread560-39970, Mar12 2003.

RE: How to put a file of points into CATIA from a file

I did as you said and got the GSD_ElementsFromExcel.xls file, but what I ran the Feuil.Main Macro, choosing option 3, it kept reading beyond the "End" and the computer thought for a while.  It stopped after a couple minutes and a message came up from Visual Basic saying "Overflow" and apparently it kept reading done to line 32,767 in Excel.  I didn't modify the original file I downloaded, and I did have an existing .CATPart file open in Catia.  Do I need to modify the Macro and tell it to stop reading lines?  I have experience programming in C, but not in Visual Basic.

thanks
greg

RE: How to put a file of points into CATIA from a file

Hi,

With the default XL file I have no pb, can you provide your XYZ point file so I can try ?


By the way I added 1 line to avoid the PB if you have 1 Part open with no open body/geometricalset...

find this :

Sub CreationPoint()

    'Get CATIA
    Dim PtDoc As Object
    Set PtDoc = GetCATIAPartDocument
    
    'Get the HybridBody
    Dim myHBody As Object
    
    If PtDoc.Part.HybridBodies.Count = 0 Then PtDoc.Part.HybridBodies.Add
    
    Set myHBody = PtDoc.Part.HybridBodies.Item(1)
    
    Dim iLigne As Integer


add the red bold line to avois error in script. You can also add line to avoid error if you dont have a CATPart active...

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file

... you should read AVOID not avois  


       SoRRy         

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file

I just find out that end is not good  it must be End  case sensitive !!!

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file


Greg, try using option 1 first, to load points. If that works, then option 2 for a spline. Don't use option 3 unless the submitted data is for more than one spline, the minimum to make a Loft is two section curves.

Eric, yes, the syntax on the Excel front sheet has to be exactly correct, in this case it is End.
Also, More Haste, Less Speed ...

RE: How to put a file of points into CATIA from a file

Thanks for all your help, but I am stil having problems.  At one point I could get all the points to plot (Option 1), but did not get a spline to form (Option 2).  I started all over and now when I try to run the macro in excel (I have Catia running with a current .CATPart file), no matter which option I choose, a Microsoft Visual Basic message pops up and says "Object doesn't support this property or method."  I am using v5r13, not sure if this makes a difference.  I am also using Windows XP.

My guess is some lingo isn't correct.  Online I found both a GSD_ElementsFromExcel.xls and an ElementsFromExcel.xls.  While I don't want to use the loft feature I noticed in one it says StartLoft and in another it says StartMulti-SectionSurface.  Can I just delete this since I only want to plot points and make a spline?

Thanks again.

RE: How to put a file of points into CATIA from a file


Greg, that's interesting, the same thing happened to me earlier this year when I tried to do this on a machine that was running V5 R12. Whatever I did it would not do any more than create Points, it gave the error message you've seen,so I forgot about it and and have been using a R9 machine since.

Can you get access to a V5 R9 machine and try it, I've never had any trouble with this Release for this work ?

RE: How to put a file of points into CATIA from a file

I think I need to talk to our networking guys.  Today it is working (as far as plotting points), but just like you said, I can't make a spline.

It goes through all the points though and doesn't come up with the error until it gets to "EndCurve" and then the error comes.  In Catia it has all the points as errors.  Could there be another command besides EndCurve?  Maybe it was an update in after the v5r9 version and had continued until now.  It seems to be just the commands such as Start..., or End... that are giving the errors.  Any ideas for other names Catia may have switched to?

I tried Spline, but this will still work with just plotting the points, but when I try to choose option two, it reads about 20 lines, pauses and jumps to the end while nothing was actually done in Catia.

RE: How to put a file of points into CATIA from a file

can you try with the EXCEL file from the Online doc without changing anything ?

Just be carefull to have a CATPart with an openbody / geometrical set...

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file

Kapitan,
I have similar problem as IsoGreg, even worst.
I cannot Enable Macros in the GSD_PointSplineLoftFromExcel.xls, I chose the GSD_PointSplineLoftFromExcel.xls!Feuil1.Main, and run it, but error message come up "The macros in this project are disabled.
Why, Why, Why???

Johnny Ng
NC programmer
jng@contouraerospace.com
http://www.geocities.com/johnny5ng

RE: How to put a file of points into CATIA from a file

Because of the security option in EXCEL... turn it off! at least for this test.

Tools / macro / security... LOW

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file

the file from the online doc is not good since R12.

to get a new file go to  : www.catiav5forum.com

look in the database download...

INDOCTI DISCANT ET AMENT MEMINISSE PERITI

Eric N.

catiav5@softhome.net

RE: How to put a file of points into CATIA from a file

I have been trying to use the PointSplineLoft.xls excel file and I keep getting a Visual basic error saying "Object doesn't support this property or method"  I've tried the file with no modifications and have tried all 3 options when the macro starts.  Every time I get the same error message.  Does anyone have any ideas?

Thanks

RE: How to put a file of points into CATIA from a file

I forgot to mention in my previous post that I am using Catia V5R8

Thanks

RE: How to put a file of points into CATIA from a file

sorry i do not have R8 anymore installed on my computer.

check in the R8 online doc to see if there is something.

Eric N.
indocti discant et ament meminisse periti

RE: How to put a file of points into CATIA from a file


As far I know, "Creating Elements from an External File", only works from Release 9 and upward. However I also got the same message when attempting to do it on R12, so I keep R9 loaded just for that reason.
In R15 the problem has been resolved, I'm told, but the best answer is to upgrade.  

RE: How to put a file of points into CATIA from a file

Thanks Kapitan,

You are absolutely right.  V5R8 doesn't support this feature.  So, I just sent the .xls file with my data modifications back to my freind (the one I got the original file from in the first place), and had him run it through R10.  He then sent the catia model back to me.  I haven't tried to open it yet, but he said the macro ran fine and the model had curvy lines in it just like I told him it would.  Thanks again.  

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