CoCreate User Forum  

Go Back   CoCreate User Forum > Support > Customization

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 08-15-2013, 08:45 AM
Mike_Maenpaa Mike_Maenpaa is offline
Registered User
 
Join Date: Aug 2013
Posts: 14
Action in all viewports

I used the macro recorder to get the line of code below.
How can this work for the current active viewport not just "vport1"?

" uic_set_vp_direction 1.0,1.0,-1.0 "vport1" fit_vp "vport1" update_screen "

Thanks!

Mike
Reply With Quote
  #2  
Old 08-15-2013, 01:28 PM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: Action in all viewports

Quote:
Originally Posted by Mike_Maenpaa View Post
I used the macro recorder to get the line of code below.
How can this work for the current active viewport not just "vport1"?

" uic_set_vp_direction 1.0,1.0,-1.0 "vport1" fit_vp "vport1" update_screen "
Hi Mike,

Welcome to the forums!

I think what you're looking for is:
" uic_set_vp_direction 1.0,1.0,-1.0 (oli:sd-inq-current-vp) fit_vp (oli:sd-inq-current-vp) update_screen "

Of course, if you're going to be doing a lot of calls that involve the current viewport, it would be more efficient to inquire it once and re-use it. But the above code should work nicely for what you're doing.

Again, welcome!

Good luck!

andy
__________________
Andy Poulsen
AI MAXTools: Dream. Design. Done. It's that easy!
Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+!
See them in action at www.ai-maxtools.com and then try them for yourself -- FREE!
Reply With Quote
  #3  
Old 08-15-2013, 01:56 PM
Mike_Maenpaa Mike_Maenpaa is offline
Registered User
 
Join Date: Aug 2013
Posts: 14
Re: Action in all viewports

Thanks Andy,

That worked.
I"m new to LISP in CoCreate, but used AutoLISP a long time ago in AutoCAD.
I tried that, but I was missing the "oli:"

Thanks again!

Mike
Reply With Quote
  #4  
Old 08-15-2013, 02:33 PM
Andy Poulsen Andy Poulsen is offline
Administrator
 
Join Date: Apr 2003
Location: Fort Collins, Colorado
Posts: 273
Re: Action in all viewports

Quote:
Originally Posted by Mike_Maenpaa View Post
That worked.
I"m new to LISP in CoCreate, but used AutoLISP a long time ago in AutoCAD.
I tried that, but I was missing the "oli:"

Thanks again!

Mike
Hi Mike,

No problem -- glad it helped! If you're going to do much lisp programming, you definitely want to make sure you set up your own lisp package, and use the "oli" package since it has just about all of the commands you'll need.

Let me know know if you have any questions.

Have fun!

andy
__________________
Andy Poulsen
AI MAXTools: Dream. Design. Done. It's that easy!
Add-ins bringing new functionality and speed to Creo Elements/Direct and CoCreate products. Now available for v17-v20+!
See them in action at www.ai-maxtools.com and then try them for yourself -- FREE!
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 07:50 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.