FeatureScript editing logic function

graham_lock
graham_lock Member Posts: 277 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

  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 PRO

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


    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • graham_lock
    graham_lock Member Posts: 277 PRO
    Thank you but I get an error message of document doesn't exist or I don't have permissions?
  • MichaelPascoe
    MichaelPascoe Member Posts: 2,956 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 - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • jnewth_onshape
    jnewth_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_lock
    graham_lock Member Posts: 277 PRO
    Fantastic thank you.

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

    RENDERCAD - Photorealistic product rendering.
    CADSharp - Professional CAD + software consulting.

    ▚▞▚▞▚▞▚▞▚
  • graham_lock
    graham_lock Member Posts: 277 PRO
    Thank you!