|
changing sketch text font
hi everyone,
i want to change the font of the sketch text i add on a component on an assembly.
what i do is edit the component insert the sketchtext and then change the font.
the font does not seem to change initially but when i edit the sketch and check the font of the sketch text it reads the one that i had chosen from the code and then updates it.
the strange this is that when i run the same code on a new part (instead of a component in an assembly) the font updates fine.
below is the part of the code that is meant to do the trick but fails.
set sktext = modeldoc.insertsketchtext(0, 0, 0, "b", 0, 0, 0, 100, 100)
set txtformat = sktext.gettextformat
txtformat.typefacename = "stencil"
boolstatus = sktext.settextformat(false, txtformat)
anyone has any idea why?
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
you will need to run editrebuild3 on the assembly and editrebuild on the part, and possibly the view update command too (cant remember it of the top of my head)
hey luke,
i tried that it doesnt seem to work ...
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
it may be a bug similar to the one i found where if you try to unblank a components plane from an assembly it will not work no matter what, but do it at part level and it is fine.
cannot think of anything else except maybe putting the part into an edit state (using accessselections), then doing it, the releasing the access selection. this would be a fairly slow process though.
thanks for the replies luke,
i'll get in touch with my support people too and see what they have to say.
cheers,
--stav.
in this world i am nobody...
and nobody is perfect ;) !!!
---------
solidworks office 2008 sp4.0
dell precision pws390
nvidia quadro fx 3450/4000 sdi
quick |
|