Edit
Attach
Printable
topic end
<!-- * Set TOPICTITLE = <nop>CoCreate Modeling code examples: List modified parts --> <style type="text/css"> pre { background-color:#FFEECC; } </style> --- #ListModifiedParts ---++ <nop>CoCreate Modeling code examples: List modified parts This is a trivial variation of MacroDeleteMatchingParts. Instead of checking whether the name of a part in a selection matches a given pattern, we check its modification status; if it has been modified since it was loaded, it will be listed in the output box. The dialog expects a list of parts as input; if you want to check the modification status of all parts in an assembly, use a "recursive/in assembly" selection. Unfortunately, this code does not work as expected for parts loaded from the database. Future versions of <nop>CoCreate Modeling will probably address this, and I'll update the code below when this happens. <pre> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Description: Lists modified parts in a selection ;; Author: Claus Brod ;; Created: 10/26/2005 14:00 ;; Language: Lisp ;; ;; (C) Copyright 2005 Claus Brod, all rights reserved ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (in-package :clausbrod.de) (use-package :oli) (sd-defdialog 'LIST_MODIFIED_PARTS :dialog-title "List modified parts" :toolbox-button t :variables '( (parts :value-type :part-assembly :multiple-items t :modifies nil)) :local-functions '( (list-modified (item) (when (sd-inq-obj-contents-modified-p item) (display (format nil "Modified: ~A~%" (sd-inq-obj-pathname item)))))) :ok-action '(mapc #'list-modified parts) ) </pre> -- Main.ClausBrod - 26 Oct 2005 OSDM 2006 fixes the issue described above by adding a new keyword parameter =:check-database= to =sd-inq-obj-contents-modified-p=. Here's the new version of the local function =list-modified=: <pre> (list-modified (item) (when (sd-inq-obj-contents-modified-p item :check-database t) (display (format nil "Modified: ~A~%" (sd-inq-obj-pathname item)))))) </pre> -- Main.ClausBrod - 27 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.11 |
>
|
r1.10
|
>
|
r1.9
|
Total page history
|
Backlinks
You are here:
CoCreateModeling
>
MacroListModifiedParts
r1.11 - 24 Jul 2009 - 19:56 -
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