CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 04-11-2003, 02:05 AM
fabrizio fabrizio is offline
Registered User
 
Join Date: Jan 2003
Location: Parma - Italy
Posts: 34
How to automatically position AM views via lisp code?

Hi all.
I have the need to automatically position the annotation views of a 3D Model via lisp program. In other words, I need to write a command that, without asking any input to the user, generates some views of a model in a position calculated by the program itself, and updates 'em, all in one click. The problem is that none of the commands that create Annotation views AM_CREATE_DWG, AM_CREATE_STANDARD, etc...) accepts also a position to place the views themselves.
The way the views are positioned is somehow different from all other OSD and AM commands because :
1- The user can't type into the command line the cohordinates of where the view should be positioned (he has to pick a point with the mouse)
2- You can't tell such position to Annotation via lisp program in the "standard" way.

Is there a way to tell to Annotation the position where a view should be placed when you use the commands AM_CREATE_DWG, AM_CREATE_STANDARD, ecc...) in a lisp program?

Thanx a lot in advance.
Fabrizio
Reply With Quote
  #2  
Old 04-11-2003, 01:42 PM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
A look into the integration kit index for Annotation would be very helpful.
there is:
  • (oli::sd-am-create-standard-view ...)
  • (oli::sd-am-create-section-view ...)
both available since a couple of versions. (about 2 years)

inside AM_CREATE_DWG you can use 'auto place' mechanism with 1st andd 3rd angle projection.

inside AM_CREATE_STANDARD as well as in all other view creation dialogs you can use the (hidden) keyword :position which is also available since 2 or 3 versions. You can create/place one view per call. Have a look to the online reference.

example:
Code:
(am_create_general
 :direction (set_vp_direction "Aux. VP"  -0.8,-0.5,0.3)
 :vp_dir "Aux. VP"
 :position -200,220)
(am_create_section :PARENT_VIEW "/ServoBlock/vs1/front1"
 :line-twopts -171,58 -165,34 -141,39
              -137,15 -120,24 -109,4
 :accept
 :position -50,50)
This should solve your problem completely.
Reply With Quote
  #3  
Old 04-14-2003, 12:29 AM
fabrizio fabrizio is offline
Registered User
 
Join Date: Jan 2003
Location: Parma - Italy
Posts: 34
Wolfgang,
thanks a lot for your precision. Sorry, it's my fault, because I didn't check the IKit documentation accurately.
But the two functions you reported
  • (oli::sd-am-create-standard-view ...)
  • (oli::sd-am-create-section-view ...)
are not suitable to create and position a view from a 3d docuplane; and that is what I have to do at the moment in my program (sorry for not beeing enough precise in my original post... )



Quote:
inside AM_CREATE_DWG you can use 'auto place' mechanism with 1st andd 3rd angle projection.
Neither this mechanism seems to be available for docuplane originated views...



Quote:
inside AM_CREATE_STANDARD as well as in all other view creation dialogs you can use the (hidden) keyword : position
I tryed the hidden keyword : position inside the command am_transfer_docuplane (which creates an annotation view from a docuplane) but it seems to be ignored by Annotation.

Anyway, thank you a lot.

Has anyone any other suggestions/ideas?

Thanks
Fabrizio
Reply With Quote
  #4  
Old 04-14-2003, 06:04 AM
Wolfgang's Avatar
Wolfgang Wolfgang is offline
Registered User
 
Join Date: Nov 2002
Location: ... near Sindelfingen near Stuttgart, Germany
Posts: 754
well well, we have been talking about normal annotation views. Yes, am_transfer_docuplane does not support the :position keyword.

Now my ideas come to an end..
Reply With Quote
Reply


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

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 07:22 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.