CoCreate User Forum  

Go Back   CoCreate User Forum > Applications > CoCreate Modeling

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-27-2015, 09:03 AM
ludw ludw is offline
Registered User
 
Join Date: Dec 2006
Location: France
Posts: 86
Highlight a list of selected parts in LISP

I've a LISP that terminates by a list of parts I would like to highlight. Does somebody know how to use HIGHLIGHT_ELEMENT, or something else, please.
Reply With Quote
  #2  
Old 05-27-2015, 10:22 PM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
Re: Highlight a list of selected parts in LISP

Here's a thread about it:
http://www.cocreateusers.org/forum/showthread.php?t=7381
Regards, Jaap
Reply With Quote
  #3  
Old 05-28-2015, 01:59 AM
ludw ludw is offline
Registered User
 
Join Date: Dec 2006
Location: France
Posts: 86
Re: Highlight a list of selected parts in LISP

Thanks a lot Jaap
Reply With Quote
  #4  
Old 06-02-2015, 12:14 PM
ludw ludw is offline
Registered User
 
Join Date: Dec 2006
Location: France
Posts: 86
Re: Highlight a list of selected parts in LISP

Hello,
I learned about preselect, but I've been unable to manage a list of parts. How did you highlight a list of models please? Could you explain a fragment of code about?
Reply With Quote
  #5  
Old 06-03-2015, 04:42 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
Re: Highlight a list of selected parts in LISP

Hi,

maybe this example helps:
Code:
(in-package :JAAPS_TOOLS)

(use-package :OLI)

(sd-defdialog 'Highlight_parts
 
 	:dialog-title "Highlight parts"
	:toolbox-button t
  
	:variables
 	'(
		(items :selection (*sd-part-seltype* *sd-assembly-seltype*) 
			:multiple-items t 
			:modifies :nil 
			:title "Parts/Assemblies 1"
		)
		(items2 :selection (*sd-part-seltype* *sd-assembly-seltype*) 
			:multiple-items t 
			:modifies :nil 
			:title "Parts/Assemblies 2" 
		)

 	)

 	:local-functions
  	'(
   		(doit()
			(preselect items :interactive)
		);doit
	)
  
	:ok-action 
	'(doit)
)
This macro lets you select 2 sets of parts/assemblies. While you select, the system will highlight what you are selecting at that moment. So, after selecting the second set of items, they will still be highlighted. But when you press OK, the doit-function will highlight the first selected set with the command
Code:
(preselect items :interactive)
wher "items" is the first variable. So, Modeling can highlight a list just as easily as a single item.
Regards,
Jaap
Reply With Quote
  #6  
Old 06-16-2015, 11:28 PM
ludw ludw is offline
Registered User
 
Join Date: Dec 2006
Location: France
Posts: 86
Re: Highlight a list of selected parts in LISP

Thanks Jaap. This seems to work associated to a dialog variable.
Finally, I used
(get_selection
:focus_type *sd-edge-3d-seltype*
:select :in_part element)
To highlight <element>'s edges in a recursive function to proceed with an <elements>'s list.
Reply With Quote
Reply

Tags
modeling lisp highlight


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:52 AM.



Hosted by SureServer    Forums   Modeling FAQ   Macro Site   Vendor/Contractors   Software Resellers   CoCreate   Gallery   Home   Board Members   Regional User Groups  By-Laws  

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.