API nonsense

Jun 13, 2006 6 Replies

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



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

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.

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required