API nonsense

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

Reply to
cdubea
Loading thread data ...

Reply to
That70sTick

Reply to
rmchugh

Reply to
That70sTick

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

Reply to
cdubea

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.

Reply to
That70sTick

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.

snipped-for-privacy@mov> > Parting lines... does not seem to be part of the core SW API (or core

Reply to
Mr. Who

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.