Skip to content

Is it possible to delete export_solid ? #119

Description

@faure-levoux

Hi !
I created an export solid with cwapi3dpython, and I want to delete it after the export solid.
When I use delete_elements, all the elements from the scene is deleted but not the export solid. Why ?

Here's my code :

solid_id = ec.create_auto_export_solid_from_standard(list_elements, "export", "name_export_solid")
sd.export_export_solid_with_clipboard(1, [solid_id])
ec.delete_elements(solid_id)

Thanks !

Activity

  1. Brunner246 commented on Jan 25, 2024

    @Brunner246
    Contributor

    What do u get as return ?

    In my case it worked:

    1. get active elements
    2. create an export solid
    3. delete export solid
    import element_controller as ec
    import attribute_controller as ac
    import cadwork
    
     ec.get_active_identifiable_element_ids()
    [62992797]
    
    ec.create_auto_export_solid_from_standard([62992797], "Test", "NewTest")
    841949936
    ec.delete_elements([841949936])
  2. faure-levoux commented on Jan 25, 2024

    @faure-levoux
    Author

    It was a stupid misake ... I forgot [] around solid_id.
    Here everything's working :

    solid_id = ec.create_auto_export_solid_from_standard(list_elements, "export", "name_export_solid")
    sd.export_export_solid_with_clipboard(1, [solid_id])
    ec.delete_elements([solid_id])

    Thanks

  3. locked and limited conversation to collaborators on Mar 1, 2024
  4. converted this issue into a discussion #132 on Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions