|
api to create partdoc object
i am trying to create new ipartdoc object ( using vc++ com). is their any api available to do this in sw2008 api .
also is their any api gives copy of partdoc object something similar to body2.copy() .
thanks
avadhani
hi there,
i am not sure i understood what you are trying to do but here we go anyway.
if you have a part document open in solidworks use :
sldworks::iactivedoc2. this will return the currently active document.
if you want to create a new part doc use:
sldworks::inewdocument2
and make sure you use the part template. this function will return you the newly created part doc object
why do you need a copy of the partdoc?
how are you going to use it that requires you having a copy of it?
--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
edited: 10/01/2008 at 06:59 am by stavros antoniou
i was refering to one of api examples present in solidworks website. (how to export selected assembly component as a parasolid file) solution they provided is create temporary part , add bodies to it and then save that temporary part. so in this context ,
i need to create new partdoc (in vc++ com)
or
i can create just copy of partdoc i,e, as temporary part and save it. in this way this helps me copying of partdoc.
i can also edit the temporary part without disturbing original part.
thanks
answer to create a new part use:
sldworks::inewdocument2
and use the part template
to create a copy of a part use:
modeldocextension::saveas
and in the options use swsaveasoptions_e.swsaveasoptions_copy
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
why it doesn't work for my application?
environment:
solidworks2008 sp4.0 32bit
vb.net 2008
windows xp 2002 professional
edited: 10/08/2008 at 11:00 am by shelley hankey
you 'll have to be a bit more precise shelley.
what exactly does not 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
quick |
|