Skip to main content
Dec 3, 2015 12:52 AM UTC
Archived

Have a setting to have the "One Level" option be the default for the Copy command

Related products:Creo Parametric

Ideally this should be the default because if you have it set by mistake, it is easy to fix by using the "Unshare" command on all items that shouldn't be shares. If that option is off (like the default is now) by mistake, it is VERY DIFFICULT to fix this later-there isn't a good way to take a copy of a part and make it a share instead; the only option is to start over.

4 replies

Dec 3, 2015 7:09 AM UTC

Hello Peter,

you can ad the following commands to your sd_customize:

;; copy part or Assembly:

(copy-default :onelevel) ; one level

;; (copy-default :deep) ; all levels

;; keep attribute shared parts

(share-default :keep_attr)

;; (share-default :cut_attr)

;; unshare

(unshare-default :onelevel)

; (unshare-default :deep)

just have a look to the German help page

Unofficial Help Page about SolidDesigner - Tips and Tricks

regards, Uwe

Dec 3, 2015 4:21 PM UTC

Thanks for that tip; I did not know those options were available.

Dec 4, 2015 5:12 PM UTC

Using that information, I came up with a function to set the defaults for both-defaults that will be kept for the next session. (All the information below should be saved to a file and loaded using the 'sd_customize' file.)

(in-package :my-package)
(use-package :oli)

(sd-defdialog 'Copy_Share_options
  :dialog-title "Set Copy/Share Options"
  :toolbox-button t
  :variables
  '(("Copy Default")
     (One_level :value-type :boolean
   :title "Copy One Level (share subs)"
   :toggle-type :wide-toggle
   :initial-value (oli:sd-get-persistent-data "ALL" "CopyOneLevel" :default nil)
   )
(Deep :value-type :boolean
   :title "Copy All Levels"
   :toggle-type :wide-toggle
   :initial-value (oli:sd-get-persistent-data "ALL" "CopyOneLevel" :default t)
   ) 
   ("Share Default")
     (Keep_Attr :value-type :boolean
   :title "Keep Attributes On"
   :toggle-type :wide-toggle
   :initial-value (oli:sd-get-persistent-data "ALL" "KeepAttr" :default nil)
   )
(Cut_Attr :value-type :boolean
   :title "Keep Attributes Off"
   :toggle-type :wide-toggle
   :initial-value (oli:sd-get-persistent-data "ALL" "KeepAttr" :default t)
   ) 
  )
:mutual-exclusion '((One_level Deep) (Keep_Attr Cut_Attr))
:ok-action '(progn
    (if One_level
     (progn
      (mei::copy-default :onelevel)
      (oli:sd-set-persistent-data "ALL" "CopyOneLevel" t)
     )
     (progn
      (mei::copy-default :deep)
      (oli:sd-set-persistent-data "ALL" "CopyOneLevel" nil)
     )
    )
    (if Keep_Attr
     (progn
      (mei::share-default :keep_attr)
      (oli:sd-set-persistent-data "ALL" "KeepAttr" t)
     )
     (progn
      (mei::share-default :cut_attr)
      (oli:sd-set-persistent-data "ALL" "KeepAttr" nil)
     )
    )
   )
)


(if (oli:sd-get-persistent-data "ALL" "CopyOneLevel" :default nil)
(mei::copy-default :onelevel)
(mei::copy-default :deep)
)

(if (oli:sd-get-persistent-data "ALL" "KeepAttr" :default nil)
(mei::share-default :keep_attr)
(mei::share-default :cut_attr)
)

olivierlp
Community Manager
Jan 4, 2022 4:10 PM UTC
Status changed to: Archived

Hello,

We are archiving your idea as part of a general review. This action is based on the age of your idea and the total number of votes received, as per this announcement.

You can always post a new idea with all the details required in the form.

Thank you for your participation.

Olivier