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.

FeatureScript editing logic function

graham_lockgraham_lock Member Posts: 265 PRO
Hi,

I've found the documentation for the Editing Logic function but I can't see how to actually link it to the feature?

Any example appreciated.

Best Answer

Answers

  • MichaelPascoeMichaelPascoe Member Posts: 2,803 PRO

    Here is an example of how to use it: Editing logic example


    RENDERCAD
    rendercad.ai - Photorealistic product rendering.

    ▚▞▚▞▚▞▚▞▚
    ________________________________________________________________________
  • graham_lockgraham_lock Member Posts: 265 PRO
    Thank you but I get an error message of document doesn't exist or I don't have permissions?
  • MichaelPascoeMichaelPascoe Member Posts: 2,803 PRO
    edited July 2024

    There you go, it's set to public now.

    Also here is more explaining how edit logic works: edit logic forum post


    RENDERCAD
    rendercad.ai - Photorealistic product rendering.

    ▚▞▚▞▚▞▚▞▚
    ________________________________________________________________________
  • jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89 image
    edited July 2024
    I've listed this from frame.fs (forgive the formatting, I dont write the forum software we use):

    /**
    * Create frames from a profile and set of path selections.
    */
    annotation {
    "Feature Type Name" : "Frame",
    "Manipulator Change Function" : "frameManipulators",
    "Filter Selector" : "allparts",
    "Editing Logic Function" : "frameEditLogicFunction"
    }
    export const frame = defineFeature(function(context is Context, id is Id, definition is map)


    The annotation that precedes the function code specifies a bunch of useful bits. This is how we tell the function what manipulator function to use and what editing logic function to use.
  • graham_lockgraham_lock Member Posts: 265 PRO
    Fantastic thank you.

    The link to edit logic forum post points to the sample document?
  • MichaelPascoeMichaelPascoe Member Posts: 2,803 PRO
    Answer ✓

    RENDERCAD
    rendercad.ai - Photorealistic product rendering.

    ▚▞▚▞▚▞▚▞▚
    ________________________________________________________________________
  • graham_lockgraham_lock Member Posts: 265 PRO
    Thank you!
Sign In or Register to comment.