CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 02-10-2003, 02:55 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
How do I add a text or symbol to a Flat???

Hi,

I'm trying to make a lisp routine that automatically puts symbols in round holes of the Annotation flat of a sheet metal part.
I have no problems in doing a similar action in a normal 2d view, but a flat seems to refuse texts and symbols.
Here's an example of what I mean:
Code:
(in-package :OLI)
(use-package :OLI)

(sd-defdialog 'Place_text
  :dialog-title "Place Text"

  :variables 
  	'(
   		(owner :value-type :docupart :Title "owner")
	    (place :value-type :docupntcnp :Title "place")
	) 
	
  :local-functions 
  	'(
   		(doit ()
		(sd-am-create-text :text "*" :position place :owner_type :2dview :owner owner)
        )
	)


  :ok-action
	'(doit)
)
It works fine if I use this with "normal" views, but not in Flat views
Doe s anybody have a clue???
Thanks,
Regards,
Jaap Kramer
Reply With Quote
  #2  
Old 02-11-2003, 02:08 AM
GiorgioL GiorgioL is offline
Registered User
 
Join Date: Oct 2002
Location: Pordenone (PN) - ITALY
Posts: 78
Hi, jaap
change the row:

(sd-am-create-text :text "*" :position place :owner_type :2dview :owner owner)

with two rows:

(am_geo_set_domain :prompt-var "VIEW" owner)
(am_create_text :go :ok :build_in :docu-text "*" :place place)


Now you are able to put any text in any position.

Regards. GiorgioL.
Reply With Quote
  #3  
Old 02-11-2003, 02:12 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
YES!
This is what I needed!
Thanks,
Jaap
Reply With Quote
  #4  
Old 02-12-2003, 07:23 AM
ChrisE's Avatar
ChrisE ChrisE is offline
OneSpace Member
 
Join Date: Oct 2002
Location: Grünstadt, Pfalz, Germany
Posts: 121
Hi Jaap,

some recommendations regarding your example:

You shouldn't export your user-defined Lisp-functions into the IKIT package OLI. You better use your own package, so the code would e.g. read like this:

(in-package :JAAP)
(use-package :OLI)

And you should wrap all your calls to OSD functions with sd-call-cmds, e.g.
(sd-call-cmds (progn
(sd-am-.....)
(sd-am-.....)
))

This allows for better cleanup-handling, and prevents the OSD functions from terminating your dialog.

Chris
Reply With Quote
Reply


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 03:30 PM.



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.