×
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 point extraction macro help

catia point extraction macro help

catia point extraction macro help

(OP)
thread560-322777: extract point position to excel
Hi everyone,
I am trying to us the script that camadian posted in the above thread (extract points to .csv). I keep getting a runtime error permission denied on line "Set data_file = filesys.CreateTextFile(file_path2, True)". I am using CATIA V5-6 RELEASE 2015 SP5 BUILD NUMBER 25. Can anyone help me out?

RE: catia point extraction macro help

what about the script in FAQ?

Eric N.
indocti discant et ament meminisse periti

RE: catia point extraction macro help

Are you sure you have permissions to save files at file_path2?

RE: catia point extraction macro help

(OP)
itsmyjob,
I am wanting to extract to excel so that I can import into a drawing and have what I call a live coordinate table so that if a hole location changes I can just update the table with out having to redo the entire thing. will the .txt file still do that?

JeniaL,

RE: catia point extraction macro help

(OP)
JeniaL,
I will have to check with my IT dept.

RE: catia point extraction macro help

(OP)
so I changed the drive that it saves to. now when I run the macro it completes but the excel file only shows what is under the WRITE HEADER section. Then the message box saying that the macro has finished running. its like it is skipping everything from BEGIN LOOP section and below to the end message box.

RE: catia point extraction macro help

(OP)
so now I inserted an axis system and made it current and get an error on "If VBA.Left(selection1.Item(i).Type, 16) = "HybridShapePoint" Then"

RE: catia point extraction macro help

With this script solution, the excel/text file will not update by itself if points move...

There is a solution to have xyz of point in drawing linked with 3D but it is very time consuming to setup, it involves creating parameters in 3D for each X, Y and Z and creating drawing texts linked with 3D parameters...

I guess you should check with business and check if they need (or just want) a fully link XYZ table. I'm not saying scripting for link solution is not possible, but if it is what they need "you're gonna need a bigger boat"

Eric N.
indocti discant et ament meminisse periti

RE: catia point extraction macro help

what kind of point you have?

real 3D points? intersection points? points (not construction) in sketch? please show picture of point in Spec Tree.

Eric N.
indocti discant et ament meminisse periti

RE: catia point extraction macro help

CODE -->

If TypeName(selection1.Item(i).Value) = "HybridShapePoint" Then 

Eric N.
indocti discant et ament meminisse periti

RE: catia point extraction macro help

CODE

If TypeName(selection1.Item(i).Value) = "HybridShapePointCenter" Then 

Eric N.
indocti discant et ament meminisse periti

RE: catia point extraction macro help

(OP)
that worked!!! thanks. is there a way for it to be in inches not mm?

RE: catia point extraction macro help

CODE

data_file.WriteLine nom & ";" & myArray(0)/25.4 & ";" & myArray(1) /25.4& ";" & myArray(2) /25.4 & ";" & selection1.Item(i).Type 

Eric N.
indocti discant et ament meminisse periti

RE: catia point extraction macro help

(OP)
GREAT! Thanks for all your help.

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