API help for Setting Hatch pattern

Hi there,
I'm tweaking my Custom Property gizmo that I have been developing for what seems like years now and have run into a roadblock.
I'm trying to set the hatch pattern using the command
RetVal = Part.SetUserPreferenceStringValue(swMaterialPropertyCrosshatchPattern, hatch)
When I execute this I get a false in return in RetVal. This works in VBA, but not in VB. I've got everything else working, I can read and set density, but not the hatch pattern.
The odd part is when I attempt to read the existing hatch pattern, I get an empty result.
Is there a secret here or is this non-functional?
Oh, I'm using Swx 2003 SP3.1
Cheers,
Chris
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
snipped-for-privacy@movingpart.com (Chris Dubea) wrote in message

Just a follow up. I got it to work. It doesn't like the word hatch used as a variable, and I had a space in the hatch name.
Thanks anyway,
CD
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Check that swMaterialPropertyCrosshatchPattern = 13,
I've used the following line without problems in 2001 through to 2003 sp4
retval = Part.SetUserPreferenceStringValue(13, matprops(Material.ListIndex).crs)
matprops is an array of text values that contains the cross hatch pattern names i.e "ISO (Aluminum)"
Cheers Craig
snipped-for-privacy@movingpart.com (Chris Dubea) wrote in message

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Try For Materials RetVal(1) swModel.GetUserPreferenceDoubleValue(swMaterialPropertyCrosshatchScale) RetVal(2) swModel.GetUserPreferenceDoubleValue(swMaterialPropertyCrosshatchAngle) RetVal(3) swModel.GetUserPreferenceStringValue(swMaterialPropertyCrosshatchPattern)
For Views RetVal(4) = swApp.GetUserPreferenceDoubleValue(swDrawingAreaHatchScale) RetVal(5) = swApp.GetUserPreferenceDoubleValue(swDrawingAreaHatchAngle) RetVal(6) = swApp.GetUserPreferenceStringValue(swDrawingAreaHatchPattern)
-- Tony O'Hara Melbourne, Australia.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.