Jump to content

Odbx set active plotconfig


rlx

Recommended Posts

A while back responded to a post involving Publish. Think it was this one :

http://www.cadtutor.net/forum/showthread.php?97714-Print-selected-views-from-model-space

Seemed a good idea to create my own version because of a couple anoying IT related frustrations , not getting Adobe Pro (and ability to combine pdf's) and the fact that our company printer allways prints last in first out. So printing sheet 1 to 500 and I end up having to sort them by hand. Complaind about it , but ... so made yet another button to reverse plot list , problem solved.

Anyways , wrote nice dialog , did some research about copy plotconfig to other drawings , wow that worked. Generated dsd file , publish generated 1 big giant pdf. But all plotconfigs are wrong. It seems I can copy the plotconfig into the drawings , but not put them active? Well , not by odbx anyways. Can of course do that with a script, and I will if there is no other way.  It seems I can use (vlax-for layout (layouts)...etc and put plotconfig to each layout / space  in my active drawing , but not for an entire folder with odbx? Did find a .net workaround from blackbox but I would need to be able to install a dll in my acad folder and at home that would be no problem but at work... grrrr (no not you Grrr , this was a dragons roar)

So any other ideas or script it is then?

Rlx

Link to comment
Share on other sites

12 hours ago, maratovich said:

I do not fully understand your question ...
Can not you copy the print settings?
You tried other printing options, maybe you need to try a ready-made solution?

Had hoped since you can copy (add) a plotsetup to different drawings (with odbx) you could put them to a layout aswell but sadly this doesn't seem to be the case. Needless limitation in my opinion but it is what it is. And its not that bigga deal , it could haven been more elegant with odbx but I can allways sript my way out of this one. Or maybe move on to .Net

Edited by rlx
Link to comment
Share on other sites

On 9/2/2018 at 12:01 AM, rlx said:

It seems I can use (vlax-for layout (layouts)...etc and put plotconfig to each layout / space  in my active drawing

Which property or method do you use here?

Link to comment
Share on other sites

Have maybe solved the problem. Setups are copied to the drawings and assigned (to modelspace). Can open all the drawings and hit preview and it looks fine. Only when app starts -publish :

Job ID: 2
Sheet set name:
Date and time started: 9/3/2018 2:27:46 PM
Date and time completed: 9/3/2018 2:27:46 PM
UserID: 503035090
Profile ID: RLX
Total sheets: 0
Sheets plotted: 0
Number of errors: 0
Number of warnings: 0

ERROR: Internal error: Invalid plot image type

But when I go to the normal publish dialog , the sun is shining so to speak. But I'll figure it out eventually ...

Problem was after I added plotconfig in odbx document this didn't work :

 (setq cfg (vl-catch-all-apply 'vla-Item (list *odbx-cfgs* cfg-Name))) 

but this did :

 
	 (vlax-for x (vla-get-plotconfigurations odbx-doc)
      (setq all-odbx-cfgs (cons (cons (strcase (vla-get-name x)) x) all-odbx-cfgs)))
	

cant post full code yet because its still full of digi-gremlins... hope to kill'm all

gr. Rlx

ps. think I know the error source : unreferenced image. A 'gift' from somebody who worked here many years ago and had some sort or routine to automatically attached an image from his desktop , with his signature or his picture.. I dunno what it was.

Edited by rlx
Link to comment
Share on other sites

On 9/3/2018 at 10:59 AM, Roy_043 said:

Which property or method do you use here?

This is for info only , just to show what I was working on before someone today had the nerve to say the W-word to me and dumped a new project on my desk. So some options are not implemented yet or maybe not stable. Haven't tested it on an other pc yet so this may not work.

 

Put some test drawings in a folder , start app (c:rlxbatch) and add drawings to project list either by add current folder when one of the drawings is loaded or use add subfolder and save the list with a name.

 

Goto to publish , do settings , either select copy setup only (or not) , select Publish to single PdF and Use Drawings From projectlist and hopefully someting good happens....

 

Will try to work on it later , but just to give an idea...

 

main.jpg

publish.jpg

RlxBatch.lsp

  • Like 1
Link to comment
Share on other sites

How to print to different printers?
How to print on different paper sizes?
How to print title blocks from the model space (if there are several)? Or if there are several title blocks in one layout?

Link to comment
Share on other sites

6 minutes ago, maratovich said:

How to print to different printers?
How to print on different paper sizes?
How to print title blocks from the model space (if there are several)? Or if there are several title blocks in one layout?

 

for that I have the plot command

Link to comment
Share on other sites

3 minutes ago, maratovich said:

Good. I checked the possibility.

 

Haven't written the 'publish all tabs' option yet. I have a ton of buttons in my toolbars that can do all those functions , plot all tabs , to a printer or to pdf , also autodetect multiple borders etc etc. The challenge is to combine them all to one app. But time is the problem at this moment. In time I hope to add all those options.

Btw , had a look at the link you posted and it looks great. Sadly IT doesn't allow for me to install any third party software. But I think its really worth the money. If I recall , 5 dollar or euro for one year and 50 for lifetime.

Goal for this app (for me anyway) is to be able to publish my project list to a single pdf at the press of a button. And everything more is bonus but not mandatory for myself.

Link to comment
Share on other sites

@rlx

 

On 9/3/2018 at 9:59 AM, Roy_043 said:

Which property or method do you use here?

Judging form your code the applicable method is CopyFrom.

 

I have not tested your code, but does the original issue still exist? Does this method fail in an ODBX context (in AutoCAD)?

Edited by Roy_043
Link to comment
Share on other sites

3 minutes ago, Roy_043 said:

@rlx

 

Judging form your code the applicable method is CopyFrom.

 

I have not tested your code, but does the original issue still exist? Does this method fail in an ODBX context (in AutoCAD)?

 

Hi Roy,

 

CopyFrom is indeed what I use , problem lay in getting the right plotconfig object. Not sure if it was an odbx issue but the 'item method failed and the vlax-for method worked as mentioned in post #8 (had to count which post it was ... seems post numbering is foetsie?). Haven't done much batching/publishing today (work) but yesterday code performed as expected and Autocad didn't crash. Even though code still needs some work , my main objective , publish to single pdF,  seems to work , rest of the options and details will follow as I need them. I don't have many drawings with multiple layouts (not allow by document controller) but when in construction fase I do have drawings with multiple titleblocks. Have plot function to deal with that but not sure yet how I'm gonna deal with that for the publish option. And if I can make this generic so other users can use it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...