×
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

Macro for inserting multiple curves?

Macro for inserting multiple curves?

Macro for inserting multiple curves?

(OP)
I have XYZ coordinates for several curves that represent cross-sections of a part I would like to loft through. Around 25 curves containing about 65 points each need to be imported. I could make separate text files for each curve, but is there a way to do it with one excel file (possibly with each curve definition on a new sheet)?

Is this possible? I am new to the SW API, although I have used VBA in Excel a little bit.

RE: Macro for inserting multiple curves?

If you only have 25 curves it'll probably be quicker to import one at a time than to write a macro to do it automatically.

That said, if it's 25 curves for or five times a week then that might be macro territory.

-handleman, CSWP (The new, easy test)

RE: Macro for inserting multiple curves?

(OP)
Indeed. This is something that will have to be updated periodically and would benefit from use of a macro.

RE: Macro for inserting multiple curves?

This macro generates curves/surfaces in Excel and imports them into SW.  It's not exactly what you're looking for, but you can use it as a starting point for your macro.  Most of the code you'll need is already there: calling excel, reading spreadsheet values, creating curves, etc.

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