×
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

Export xyz points of 3d line sketch

Export xyz points of 3d line sketch

Export xyz points of 3d line sketch

(OP)
Hi all,

I have a 3D sketch of straight lines which I need to import into a beam element analysis software (GSA by Oasys). The problem: I cannot find a way to export xyz coordinates of my 3D sketch. A 3D dxf export from SW would do as well I suppose.

I've seen from other threads that there are APIs for xyz exporting but I've tried to run a few and keep getting a compile error: "user-defined type not defined". I don't really know how to use APIs.

Any help will be GREATLY appreciated!!!!! Thank you.

Greg

RE: Export xyz points of 3d line sketch

The error you describe is usually due to not having the proper references checked under Tools->References in the VBA editor.  It's usually easy to fix.

1. What macro(s) have you used?
2. When you get that error, can you choose "Debug"?  If so, what line comes up as yellow in the VBA editor?

-handleman, CSWP (The new, easy test)

RE: Export xyz points of 3d line sketch

Yes, you're running the macro right.  However, a complete macro file (.swp file) actually contains more data than just the text of the code.  If your macro interacts with other programs besides SW (Excel in this case), the macro has to tell SW where the instructions are for interacting with that program.  This is done by going to Tools->References in the VBA editor.  That will bring up a big list of available references.  There will be a few up at the top that are already checkmarked because they are SolidWorks or VBA related and they get checked by default every time you create a macro.  In your case, you need to scroll down the list and look for "Microsoft Excel 11.0 Object Library" and check its box.  The "11.0" number will be different if you're running some version of Excel other than 2003.

Good luck!

-handleman, CSWP (The new, easy test)

RE: Export xyz points of 3d line sketch

(OP)
ARGHHHH!!!!!!!!!!!!!! Thank you!!!

It seems so blindingly obvious when you know! Such frustration, now relieved!

Thank you for lending me your time!

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