Edit
Attach
Printable
topic end
<!-- * Set TOPICTITLE = <nop>CoCreate Modeling code examples: Using get_selection --> <style type="text/css"> pre { background-color:#FFEECC; } </style> --- #GetSelection ---++ <nop>CoCreate Designer code examples: Using <tt>get_selection</tt> =get_selection= is one of the most powerful APIs in the Integration Kit. It can be used to perform all kinds of selections in the model. All the selection criteria which you find in the UI are available; in addition you can specify filter functions which are called during selection. But this is advanced usage; let's start with something _very_ simple: Using =get_selection= to list all names of parts in an assembly. Not very useful in itself, but you can start building your own selections from there. <pre> ; -*-Lisp-*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; File: allparts.lsp ; Description: Trivial get_selection usage example ; Author: Claus Brod ; Language: Lisp ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package :clausbrod.de) (use-package :oli) (sd-defdialog 'LIST_PART_NAMES :dialog-title "List part names in assembly" :toolbox-button t :variables '( (assembly :value-type :assembly :modifies nil)) :ok-action ' (dolist (part (sd-call-cmds (get_selection :focus_type *sd-part-seltype* :select :recursive :in_assembly assembly))) (display (sd-inq-obj-basename part))) ) </pre> -- Main.ClausBrod %COMMENT{type="below" nonotify="on"}%
to top
End of topic
Skip to action links
|
Back to top
Edit
|
Attach image or document
|
Printable version
|
Raw text
|
Refresh
|
More topic actions
Revisions: | r1.5 |
>
|
r1.4
|
>
|
r1.3
|
Total page history
|
Backlinks
You are here:
CoCreateModeling
>
MacroGetSelection
r1.5 - 24 Jul 2009 - 19:55 -
ClausBrod
to top
CoCreateModeling
CoCreate Modeling
FAQ
Introduction
Hardware
Operating system
Memory management
File handling
Installation
Licensing
Graphics
App. knowhow
Lisp
Learning
Programming
Debugging
DDE
Compiler
Customization
Troubleshooting
Links
Code examples
Viewbench
News
Changes
Index
Search
Impressum
Home
Webs
Atari
Blog
Claus
CoCreateModeling
Klassentreffen
Main
Sandbox
Sommelier
TWiki
Xplm
My links
edit
TWiki
Welcome
TWiki Web TWiki Web Home Changes Topics Index Search
TWiki Webs Atari Blog Main
OneSpaceModeling
?
Sandbox TWiki TWiki Webs Atari Blog Main
OneSpaceModeling
?
Sandbox TWiki
Jump:
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback