Edit
Attach
Printable
topic end
<!-- * Set TOPICTITLE = <nop>CoCreate Modeling code examples: Listing parts in Annotation views --> <style type="text/css"> pre { background-color:#FFEECC; } </style> ---++ <nop>CoCreate Modeling: Listing parts in Annotation views The Integration Kit also has quite a number of inquiries which help with traversing the structure of a drawing. However, it can be a little tricky to get this right because of the involved data structures. Here is some code to get you started - it inquires the current viewset and, for each view in the viewset, lists the 3D parts which are in the component lists of those views. <pre> ;; -*-Lisp-*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Description: List parts in Annotation views ;; Author: Claus Brod ;; Language: Lisp ;; ;; (C) Copyright 2006 Claus Brod, all rights reserved ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (in-package :clausbrod.de) (use-package :oli) ;; list all 3D parts in the component list of an Annotation view (defun list-parts-in-view(view) (let ((viewstruct (oli:sd-am-inq-view (getf view :view-2d)))) (display (format nil "~%Parts in view ~A:~%" (oli:sd-inq-obj-pathname (getf view :view-3d)))) (when viewstruct (dolist (comp (sd-am-view-struct-parts-3d viewstruct)) (display (oli:sd-inq-obj-pathname comp)))))) ;; traverse all views in viewset (defun list-parts-in-viewset(viewset) (let ((viewsetstruct (sd-am-inq-view-set viewset))) (dolist (view (sd-am-view-set-struct-views viewsetstruct)) (list-parts-in-view view)))) ;; start from current viewset (setf currviewset (oli:sd-am-inq-curr-view-set)) (list-parts-in-viewset currviewset) </pre> -- Main.ClausBrod - 23 Jan 2006 %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.6 |
>
|
r1.5
|
>
|
r1.4
|
Total page history
|
Backlinks
You are here:
CoCreateModeling
>
MacroPartsInAnnotationViews
r1.6 - 30 Jul 2021 - 14:35 -
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