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 11-26-2014, 05:15 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
plot command overtakes update TB command??!!

Hi,

I'm creating a fast pdf-batch-plot macro, and here's the core of it:
Code:
(AM_LOAD_DRAWING :FILENAME "C:/local/test_batch_anno/56301401-A-1-DRAWING_2D_aip_dwg_annotation.mi")
(sd-call-cmds(ndm_am_update_tb))
(sd-call-cmds(AM_PLOT_EX :PLOT_STYLE :PDF :multisheet :yes :destination_browse "C:/local/test.pdf" :plot :YES))
The weird thing is that the drawing get printed before the Text Block has been updated. So, on my screen I see the right Modelmanager Attributes in the Title Block, but they are not on the pdf. I can see it happening: during the couple of seconds that loading and printing takes, first, the pdf pops up in Windows Explorer, and after that, the Text Block updates. I've tried everything, but I cannot make the plotting process wait for the Text Block Update... anyone have a clue???
Thanks!
Jaap
Reply With Quote
  #2  
Old 11-26-2014, 06:13 AM
tom kirkman's Avatar
tom kirkman tom kirkman is offline
Registered User
 
Join Date: Oct 2002
Location: Perrysburg, Ohio
Posts: 397
Re: plot command overtakes update TB command??!!

Try this and see if it works.

Code:
(AM_LOAD_DRAWING :FILENAME "C:/local/test_batch_anno/56301401-A-1-DRAWING_2D_aip_dwg_annotation.mi")
(sd-call-cmds(ndm_am_update_tb complete))
(sd-call-cmds(AM_PLOT_EX :PLOT_STYLE :PDF :multisheet :yes :destination_browse "C:/local/test.pdf" :plot :YES))
Tom
__________________
Tom Kirkman

Creo Elements/Direct 20.1
Dell Precision 3581
https://www.o-i.com
Reply With Quote
  #3  
Old 11-26-2014, 06:31 AM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
Re: plot command overtakes update TB command??!!

Thnx for the tip... sorry, doesn't work. But it got me thinking, and I used the Recorder tool to make this .rec-file:
Code:
AM_LOAD_DRAWING 
cd "C:/local/test_batch_anno"
:FILENAME "56301460-A-1-DRAWING_2D_aip_dwg_annotation.mi"
ndm_am_update_tb
AM_PLOT_EX
:PLOT_STYLE
:PDF
:multisheet :yes
:destination_browse
cd "C:/Users/JKramer/AppData/Local/Temp"
cd "C:/local"
"C:/local/test.pdf"
:plot
When running the rec file, the same problem occurs as when running the Lisp.
It really seems that the Update TB allows the system to perform other commands before it is finished...
Reply With Quote
  #4  
Old 11-26-2014, 10:15 AM
tom kirkman's Avatar
tom kirkman tom kirkman is offline
Registered User
 
Join Date: Oct 2002
Location: Perrysburg, Ohio
Posts: 397
Re: plot command overtakes update TB command??!!

This is not the most elegant solution, but give it a try.

Code:
(AM_LOAD_DRAWING :FILENAME "C:/local/test_batch_anno/56301401-A-1-DRAWING_2D_aip_dwg_annotation.mi")
(sd-call-cmds(ndm_am_update_tb))
(sleep 5)
(sd-call-cmds(AM_PLOT_EX :PLOT_STYLE :PDF :multisheet :yes :destination_browse "C:/local/test.pdf" :plot :YES))
This give a 5 second delay before starting the plot. I am not sure if it will stop the running of the title block update.
__________________
Tom Kirkman

Creo Elements/Direct 20.1
Dell Precision 3581
https://www.o-i.com
Reply With Quote
  #5  
Old 11-26-2014, 10:21 AM
tom kirkman's Avatar
tom kirkman tom kirkman is offline
Registered User
 
Join Date: Oct 2002
Location: Perrysburg, Ohio
Posts: 397
Re: plot command overtakes update TB command??!!

I answered my own question, this does not work.
__________________
Tom Kirkman

Creo Elements/Direct 20.1
Dell Precision 3581
https://www.o-i.com
Reply With Quote
  #6  
Old 11-26-2014, 12:06 PM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
Re: plot command overtakes update TB command??!!

Thnx, yes, I tried that, too :-)
Reply With Quote
  #7  
Old 12-01-2014, 10:58 PM
jkramer's Avatar
jkramer jkramer is offline
Registered User
 
Join Date: Oct 2002
Location: the Netherlands
Posts: 382
Re: plot command overtakes update TB command??!!

oh my.... just deiscovered that I asked the same question before years ago
The thread is here:
http://www.cocreateusers.org/forum/showthread.php?t=6919
Oops, I feel quite embarrased...
The conclusion then was that the update Titleblock seems to be an asynchronous command, indeed.
I'm taking a look at Drafting now...
Jaap
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 12:51 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.