Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

How to hardcode files for opImportForeign?

joshtargojoshtargo Member Posts: 540 EDU

How can I hardcode the blob data so a user can select from a list of STEP files from a dropdown list?

I've tried many different things but nothing works. this is the starting point with a single imported file for a test.

FeatureScript 2960;

import(path : "onshape/std/importForeign.fs", version : "2960.0");

import(path : "onshape/std/feature.fs", version : "2960.0");

import(path : "onshape/std/common.fs", version : "2960.0");

Part1::import(path : "4e82d1e61d46ecc058c3ab67", version : "797f1d3b6c8dd334df5c46ba");

annotation { "Feature Type Name" : "Import", "Feature Type Description" : "" }

export const myFeature = defineFeature(function(context is Context, id is Id, definition is map)

precondition
{

}
{

opImportForeign(context, id + "importForeign1",

{
"blobData" : Part1::BLOB_DATA as CADImportData});

});

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.