#1
|
|||
|
|||
Configuration
Hello,
I have created several configurations from "01" to "10" for example. How can I select these configurations one after another (with macro). I can find the variable to select the configuration. I would like to create simple animation... Thanks |
#2
|
||||
|
||||
Re: Configuration
Modeling does have a method for creating Animations but I think you need an Advanced Design license to use it. If you activate the Advanced Assembly module (formerly relations) it will add an icon (looks like a film strip) to your menu to create animations. You don't need to define relations to create the animations, but it can be helpful if simulating mechanisms.
See Help/Help Topics for more info. It is under the Extended Modules section of the Contents.
__________________
John Scheffel |
#3
|
|||
|
|||
Re: Configuration
We have a trial version of Advanced Desgin. I didn't find a solution to change the camera view during the animation.
Is it possible ? I have created (before testing the Advanced module) a animation with several configurations and a free software to record screen activity. Thanks |
#4
|
||||
|
||||
Re: Configuration
Hi,
nice thought to use configurations for an animation :-) I just used the recorder tool to find out the commands. Type this on the commend line to enable the recorder: (load "recorder") The recorder will be in the toolbox (hammer / chisel icon). A configuration is activated by this: Code:
cfn_activate_double_click_action :add_key :none :config :FULL_NAME :START_NAME "/MAIN_ASSY/SUBASSY" :CONFIGURATION "MY_CONFIG" :END_NAME complete And in Lisp, you could use this syntax: Code:
(cfn_activate_double_click_action :add_key :none :config :FULL_NAME :START_NAME "/MAIN_ASSY/SUBASSY" :CONFIGURATION "MY_CONFIG" :END_NAME) Since you have the options "Capture Drawlist" and "Capture Camera", you can even do real fancy animations with this method :-) Kind regards, Jaap |
#5
|
|||
|
|||
Re: Configuration
If we have 15 configurations for example and you would like to have animation from the 01 to 10, do you think it's possible to ask the number for the first one and the last one... and run the animation with macro (activate one after another)
I try with variable, but I can find the good solution. |
#6
|
||||
|
||||
Re: Configuration
Hi,
just experimented, but the selection mechanism of OSD sometimes confuses me... This is what gives me a list: Code:
(setf my_list (sd-inq-configurations :owner (sd-pathname-to-obj "/MY_ASSY"))) (dolist (obj my_list "done") (display (eighth(sd-inq-configuration-props obj))) ) And strangely enough, it showed only 11 of the 13 configurations in my assy??! Anyone a hint?? Regards, Jaap |
#7
|
||||
|
||||
Re: Configuration
Hi Jaap,Maximus172
I've modified your example in a working lisp file. Code:
(in-package :xandorra) (use-package :oli) (sd-defdialog 'animate_configurations :variables '( (assembly :value-type :assembly) ) :local-functions '( (doit (&aux my_list) (setf my_list (sd-inq-configurations :owner assembly)) (dolist (obj my_list) (sd-call-cmds (cfn_activate_configuration :CONFIG obj :ALL_VPS t)) ) ) ) :ok-action '(doit) )
__________________
High performance CAD workstations Please visit us at https://www.cadware.nl |
#8
|
|||
|
|||
Re: Configuration
Hi John,
It's a good job, thanks a lot Except I have one problem. I have added configurations between the others and the animation follow the date creation of the config not the order of the tree Without that, the macro will be very helpful. |
#9
|
||||
|
||||
Re: Configuration
Hi Maximus172,
You can sort the list my_list before processing John
__________________
High performance CAD workstations Please visit us at https://www.cadware.nl |
#10
|
||||
|
||||
Re: Configuration
Hi,
nice macro, John :-) Maybe a practical solution about the order of configurations would be to have 2 macro's: one that generates a text file with the available configurations, and another that executes the configurations named in the text file. This enables editing of the order before animating. Regards, Jaap |
#11
|
|||
|
|||
Re: Configuration
Sorry, but sd-inq-obj-pathname no works for configuration. Any idea?
|
#12
|
||||
|
||||
Re: Configuration
Here is an example that returns the configuration names as well:
Code:
(in-package :xandorra) (use-package :oli) (sd-defdialog 'animate_configurations :variables '( (assembly :value-type :assembly) ) :local-functions '( (doit (&aux my_list) (setf my_list (sd-inq-configurations :owner assembly)) (dolist (obj my_list) (sd-call-cmds (cfn_activate_configuration :CONFIG obj :ALL_VPS t)) (display (getf (sd-inq-configuration-props obj) :name)) ) ) ) :ok-action '(doit) )
__________________
High performance CAD workstations Please visit us at https://www.cadware.nl |
#13
|
|||
|
|||
Re: Configuration
thank you!
|
#14
|
||||
|
||||
Re: Configuration
Here is an example where the configurations are sorted based on their names:
Code:
(in-package :xandorra) (use-package :oli) (sd-defdialog 'animate_configurations :variables '( (assembly :value-type :assembly) ) :local-functions '( (doit (&aux my_list) (setf my_list (sort (sd-inq-configurations :owner assembly) #'(lambda (x y) (if (string< (getf (sd-inq-configuration-props x) :name) (getf (sd-inq-configuration-props y) :name)) t nil)))) (dolist (obj my_list) (sd-call-cmds (cfn_activate_configuration :CONFIG obj :ALL_VPS t)) ) ) ) :ok-action '(doit) )
__________________
High performance CAD workstations Please visit us at https://www.cadware.nl |
#15
|
||||
|
||||
Re: Configuration
Quote:
Code:
(nth 7 your-list)
__________________
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|