API Variant_BOOL

is Variant the same as Variant_BOOL for VisualBasic? i mean that there is an entry in help:

(VARIANT_BOOL) bEnable retval = SldWorks.EnableStereoDisplay ( bEnable ) Thus, any plug-in that might need to display stereoscopically should, upon loading, immediately call EnableStereoDisplay, with the flags field set to

0x01. To actually activate stereo display, call EnableStereoDisplay with the flags field set to 0x03. To deactivate stereo display, call EnableStereoDisplay with the flags field set to 0x01. Finally, just before the plug-in uninstalls, restore SolidWorks' default behavior by calling EnableStereoDisplay with the flags field set to 0x00.

but i can not find any way to assign 0x03 to Variant, and Dim bEnable as Variant_bool does not compile i`ve tried Dim bEnable as Variant bEnable=3 and bEnable=-3 (because true is -1) but i don`t know if it worked How can i set bitfields in VB? i have been programming in delphi, i am not good in Microsoft .Net

Reply to
Vigilante
Loading thread data ...

Boolean value is simply a number, where False equals zero and True equals any non-zero value. In VB, True is defined as -1, since in binary it is

11111111. This is to ensure, that "Not True" equals "False". In some applications written in C, "True" may be any non-zero value.

Do you have a plug-in, which is able to display stereoscopically? I have tried to tweak with stereo display as well, but the API functions in SW doesn't seem to affect the SW display. I believe, that you should have an add-in which would have an own OpenGL code to render the screen in stereo.

It would be interesting, indeed, if SW could render the left & right eye images as stereo pair in the SW screen. No physical device such as goggles would then be needed to display in true 3D.

Just like that.

-h-

Reply to
Heikki Leivo

I think if you assign 0x003 to DIM bEnable as variant then bEnable will return a hex value. If you assign a double it will be a double, etc.

My other thought is that 0x01 and 0x03 are not booleans, they are hex and typically stored > is Variant the same as Variant_BOOL for VisualBasic?

Reply to
kellnerp

Hex is not a data type, it is just a way how to express numbers. There is no difference beetween bEnable = 0x03 and bEnable = 3.

Boolean is simply an integer which is called boolean. Zero means "false" and non-zero means "true". "True" is just an integer constant which has value of -1. You can assign any numerical value to boolean variable, but it is quite rare.

-h-

Reply to
Heikki Leivo

No, i don`t have such plug-in. there was such plug-in on

formatting link
but it is no longer there. I have Quadro4 780GLX and shutter glasses, but i can`t get it to work in SW . . . .(works fine with other apps)

Thanks for help

Reply to
Vigilante

I have a version of the Stereographics plug-in that I downloaded from their web site in the Solidworks 2001 era. Do you want me to send it to you (1.26MB)? If so, is your return email address valid?

Reply to
John Williams

Didn't say hex was a data type. Read carefully what I said.

Dim bEnable as Variant

sub main()

bEnable = &HA debug.print bEnable

end sub

If you put a watch >> I think if you assign 0x003 to DIM bEnable as variant then bEnable will

Reply to
kellnerp

U¿ytkownik "John Williams" napisa³ w wiadomo¶ci news: snipped-for-privacy@corp.supernews.com...

Yes, please. My addres does not contain any "-" (minuses) Thanks in advance.

Reply to
Vigilante

U¿ytkownik "Vigilante" napisa³ w wiadomo¶ci news:3f89cdb3$ snipped-for-privacy@news.home.net.pl...

Well, there`s the result: Plug-in installed, added an option to Turn it on. When turned on, i can see a difference, because image goes a bit right. It looks like it shows only the image for right eye, not switching to left. Shutterglasses appear not to turn on, nor even blink. When i adjust stereo options, image goes a bit left or right. So there is something about it, but so far i didn`t manage to make it work . . . .

Reply to
Vigilante

I write it one more time, including keywords, so i hope someone searching google will find it

Keywords: SolidWorks stereo stereographics GeForce Quadro4 SoftQuadro shutter glasses API EnableStereoDisplay

My story is that i bought gaiward Ti4200 + Stereo Shutter glasses for 3D viewing, and intended to work with it in SolidWorks. Bad luck, though. did not worked. I`ve conducted deep search and finded another post that with Asus GF it doesn`t work either. Here`s what i`ve tried:

  1. SoftQuadro4 with RivaTuner -> GF becomes Q4 780 GLX
  2. StereoGraphics Plug-in for SolidWorks 2001
  3. almost evry combination of settings

Well, there`s the result: Plug-in installed, i can see it added an option in SW\View to Turn it on. When turned on, i can see a difference, because image goes a bit right. It looks like it shows only the image for right eye, not switching to left. Shutterglasses appear not to turn on, nor even blink. When i adjust stereo options, image goes a bit left or right. So there is something about it, but so far i didn`t manage to make it work .

If you find out anything that might help, please let me know: snipped-for-privacy@ho-me.pl (with no antispam - minuses inside)

Reply to
Vigilante

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.