Export Parasolid using journal
Export Parasolid using journal
(OP)
I wrote the following code to export all the solids on the work layer to a parasolid:
dim wlayer as integer = workPart.layers.worklayer
dim objs as NXObject()=workpart.layers.getallobjectsonlayer(wlayer)
dim obj as NXObject
dim taglst(objs.length) as Tag
dim t as tag
dim x as integer=0
dim b as body
Dim strParasolid as string
for each obj in objs
if obj.gettype.tostring="NXOpen.Body" then
b=CTYPE(obj,Body)
taglst(x)=b.tag
x=x+1
end if
next
strParasolid = GetFilePath() & GetFileName() & ".x_t"
ufs.Ps.exportdata(taglst, strParasolid)
But when I run the code, I get an error from the exportdata function saying I have "Incorrect object for this operation" (I've attached a picture of the error). Can anyone tell me what is wrong with the code?
Thanks
dim wlayer as integer = workPart.layers.worklayer
dim objs as NXObject()=workpart.layers.getallobjectsonlayer(wlayer)
dim obj as NXObject
dim taglst(objs.length) as Tag
dim t as tag
dim x as integer=0
dim b as body
Dim strParasolid as string
for each obj in objs
if obj.gettype.tostring="NXOpen.Body" then
b=CTYPE(obj,Body)
taglst(x)=b.tag
x=x+1
end if
next
strParasolid = GetFilePath() & GetFileName() & ".x_t"
ufs.Ps.exportdata(taglst, strParasolid)
But when I run the code, I get an error from the exportdata function saying I have "Incorrect object for this operation" (I've attached a picture of the error). Can anyone tell me what is wrong with the code?
Thanks





RE: Export Parasolid using journal
h
RE: Export Parasolid using journal