API nonsense

Discussion in 'SolidWorks' started by cdubea, Jun 13, 2006.

  1. cdubea

    cdubea Guest

    Argh.

    I want to write a macro to reset the view toggles when bringing in
    older parts into v2005. I use the macro recorder to create the
    framework. Everything works great, except "View Parting lines".

    In the macro it defines this functionality as
    part.ViewDispPartingLines. Well guess what? There isn't a function by
    that name. I searched API help and the object browser in VB Pro.

    Thanks Concord. I greatly appreciate that!

    Chris
     
    cdubea, Jun 13, 2006
    #1
  2. cdubea

    That70sTick Guest

    Parting lines... does not seem to be part of the core SW API (or core
    SW modelling, for that matter). Are you using a mold design addin of
    some sort?
     
    That70sTick, Jun 13, 2006
    #2
  3. cdubea

    rmchugh Guest

    I noticed the same thing with a similar macro.
    Solidworks 2006 Office Pro, no mold add-in.
    Frustrating...
     
    rmchugh, Jun 13, 2006
    #3
  4. cdubea

    That70sTick Guest

    Just advertised my own ignorance. Never really looked at the mold
    tools before.
     
    That70sTick, Jun 13, 2006
    #4
  5. cdubea

    cdubea Guest

    Nope.

    If you choose the View menu, it's the last selection under "Hide All
    Types". For some reason when I bring in an old part SolidWorks toggles
    this on. I'm anal retentive about displays and such and wanted to
    write a gizmo to set the views to how I wanted them, not SolidWorks.

    Everything else works just fine. It's weird because I wrote a monitor
    app to flag when I toggled it and it indicated the
    swUserPreferenceToggle_e was 157. In my copy of SWCONST.BAS 147 is for
    swDetailingDimensionsToleranceUseDimensionFont. WTF is that all about?
    Toggling it doesn't turn the thing off.

    My head hurts now. Time for a nap.

    Thanks Roland,

    chris
     
    cdubea, Jun 13, 2006
    #5
  6. cdubea

    That70sTick Guest

    Not much help, but might explain....

    Not all SW functions are available to the public. Some can only be
    called by the application that owns them. I would guess that is the
    case here. The macro records the function, but it is not available for
    public use.
     
    That70sTick, Jun 13, 2006
    #6
  7. cdubea

    Mr. Who Guest

    swViewDisplayHideAllTypes equates to 198 in my solidworks 2006 sp0
    installation.
    When i wrote a quick macro to utilize it - it did nothing. Looks as
    though this api is not behaving nicely.

    The parting lines toggle has no userpreferencetoggle constant so I
    doubt it will work. I would submit both points as bugs.
     
    Mr. Who, Jun 14, 2006
    #7
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.