cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

export a step file with weblink

AlwinHekker
3-Newcomer

export a step file with weblink

Who can help me im trying to export a STEP filewith weblink in wf 3.0. But when i use this function it's given me an error like [object type].

function ExportSTP(model){

try

{

var exportflag = new pfcCreate ("pfcGeometryFlags").Create();
var modelexport = new pfcCreate("pfcAssemblyConfiguration").EXPORT_ASM_SINGLE_FILE;

exportflag.AsSolids = true;

var STPexport = new pfcCreate("pfcSTEP3DExportInstructions").Create(modelexport, exportflag);
var naam = model + ".stp";
CurModel.Export(naam, STPexport);

}

catch(err){
alert("Kan tekening niet Exporteren naar STP reden: " +err );

}
}


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
3 REPLIES 3


> Who can help me im trying to export a STEP file with weblink in wf 3.0.
> But when i use this function it's given me an error like [object type].
>
> var naam = model + ".stp";
> CurModel.Export(naam, STPexport);


I think one or both of the above lines are going to give you problems.

The first of the two should probably look like this:
var naam = model.FullName + ".stp";

The second should perhaps look like this?:
model.Export(naam, STPexport);


I don't see where you have defined CurModel.


Marc
--
Marc Mettes
-
Visit My CAD/PDM AutomationBlog
Or, Subscribe to My CAD/PDM Automation Blog by Email





I see. I've added theglobalconnection. and changed the model to just a loaded part. But it still gives me an error.

function ExportSTP(){

try
{
var mGlob = pfcCreate("MpfcCOMGlobal");
var oSession = mGlob.GetProESession();
var CurModel = oSession.CurrentModel;
var exportflag = new pfcCreate ("pfcGeometryFlags").Create();
var modelexport = new pfcCreate("pfcAssemblyConfiguration").EXPORT_ASM_SINGLE_FILE;

exportflag.AsSolids = true;
exportflag.AsQuilts = true;

var STPexport = new pfcCreate("pfcSTEP3DExportInstructions").Create(modelexport, exportflag);
CurModel.Export("test.stp", STPexport);

}catch(err){
alert("Kan tekening niet Exporteren naar STP reden: " +err );

}
}

Mat
15-Moonstone
15-Moonstone
(To:AlwinHekker)

Was Your problem solved in the meantime?

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags