Macro for Text change in extrude

Discussion in 'SolidWorks' started by Alex, Jun 5, 2006.

  1. Alex

    Alex Guest

    Wondering if anyone knows how to access the text in sketch function
    without having to edit the sketch? For eg., Link a text value to the
    configuration name so that I change the config name and the text
    extrude changes?. Anyone know an easy way to do this or whether it is
    possible?
     
    Alex, Jun 5, 2006
    #1
  2. Alex

    JJ Guest

    You can change the text via API. I tried this in the past and it was
    quite easy, but I didn't store the code for it.

    Kind regards,

    J.J. Zwaard
    www.studiozwaard.nl


    Alex schreef:
     
    JJ, Jun 5, 2006
    #2
  3. Alex

    Mr. Who Guest

    I don't really see how this would be possible. Essentially you would
    need an always running program that would detect when you change a
    configuration name and then goes to your sketch, edits it, and updates
    the text used there. Seth's method sounds like the best to me.

    You could also have a macro that you run which updates the text in a
    specific sketch to reflect the configuration name. That would be
    pretty easy.

    Just use SketchText::Text to change the text.
     
    Mr. Who, Jun 5, 2006
    #3
  4. Alex

    Heikki Leivo Guest

    You could also have a macro that you run which updates the text in a
    Macro feature would be a way to do this, if one would like to regenerate the
    text on each rebuild.. You could write a macro to show user interface with
    selectionbox in propertymanager. The user would select the sketch text
    entity into the selectionbox and the feature would update the sketch text.

    -h-
     
    Heikki Leivo, Jun 5, 2006
    #4
  5. Thanks mate - Appreciate the feedback

     
    alexhenrydesign, Jun 7, 2006
    #5
  6. I would be interested to see how easy this is as my macro understanding
    is not great. Thaks for the feedback though
     
    alexhenrydesign, Jun 7, 2006
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.