Author Topic: wblock in a previous version  (Read 958 times)

0 Members and 1 Guest are viewing this topic.

domenicomaria

  • Swamp Rat
  • Posts: 725
wblock in a previous version
« on: March 31, 2023, 04:03:10 AM »
Is it possible to create DWGs in a previous version with the wblock command?

For example I use the Acad 2022 version
and I want to create DWGs in the ACAD 2000 version
with WBLOCK ...

... is it possible?

ribarm

  • Gator
  • Posts: 3274
  • Marko Ribar, architect
Re: wblock in a previous version
« Reply #1 on: March 31, 2023, 04:15:22 AM »
I think it's not possible...

Instead 2 steps :

1. WBLOCK
2. OPEN -> SAVEAS -> A2000 format
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: wblock in a previous version
« Reply #2 on: March 31, 2023, 05:11:31 AM »
 :-(

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: wblock in a previous version
« Reply #3 on: March 31, 2023, 05:21:21 AM »
For Acad >= 2007 look for vla-Put-SaveAsType

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: wblock in a previous version
« Reply #4 on: March 31, 2023, 06:37:25 AM »
@Marco

I don't want SAVEAS . . .
I want that WBLOCK creates a DWG in a previous version

I add
(setenv "DefaultFormatForSave" "12")
before WBLOCK
but the final DWG format, is the current version
and not ACAD2000 ("DefaultFormatForSave" = "12")
« Last Edit: March 31, 2023, 06:42:47 AM by domenicomaria »

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: wblock in a previous version
« Reply #5 on: March 31, 2023, 06:41:58 AM »
And before use WBLOCK, I added
(vla-put-saveastype (vla-get-opensave (vla-get-preferences (vlax-get-acad-object) ) ) ac2000_dwg )
instead of
(setenv "DefaultFormatForSave" "12")
. . .
but nothing is changed !

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: wblock in a previous version
« Reply #6 on: March 31, 2023, 10:45:17 AM »
(vla-put-saveastype (vla-get-opensave (vla-get-preferences (vlax-get-acad-object) ) ) ac2000_dwg )
Works... tested in AutoCAD 2013

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: wblock in a previous version
« Reply #7 on: March 31, 2023, 10:51:31 AM »
thank you Marco

I will give it a try
(again)
... monday !

ciao

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: wblock in a previous version
« Reply #8 on: April 03, 2023, 03:58:50 AM »
(vla-put-saveastype (vla-get-opensave (vla-get-preferences (vlax-get-acad-object) ) ) ac2000_dwg )
Works... tested in AutoCAD 2013

1
Code - Auto/Visual Lisp: [Select]

2
Code - Auto/Visual Lisp: [Select]
  1. (defun :VLA-WBLOCK (ss full-dwg-file-name / active-doc )
  2.    (:SS-MAKE-PREVIOUS- ss)
  3.    (and
  4.       ss
  5.       full-dwg-file-name
  6.       (setq active-doc (:ACTIVE-DOCUMENT) )
  7.       (not
  8.          (vl-catch-all-error-p
  9.               (vl-catch-all-apply 'vla-WBlock
  10.                (list active-doc full-dwg-file-name (vla-get-ActiveSelectionSet active-doc) )
  11.               )
  12.          )
  13.       )
  14.    )
  15. )

3
Code - Auto/Visual Lisp: [Select]
  1. LM:DWGVERSION

Marco, it seems that it does not work !


domenicomaria

  • Swamp Rat
  • Posts: 725
Re: wblock in a previous version
« Reply #10 on: April 03, 2023, 06:55:02 AM »
Have you tried wblock command?

Yes.

With wblock command, it works !

Thank you.

Marc'Antonio Alessi

  • Swamp Rat
  • Posts: 1453
  • Marco
Re: wblock in a previous version
« Reply #11 on: April 03, 2023, 08:23:47 AM »
Have you tried wblock command?

Yes.

With wblock command, it works !

Thank you.
Your question: Is it possible to create DWGs in a previous version with the wblock command?

domenicomaria

  • Swamp Rat
  • Posts: 725
Re: wblock in a previous version
« Reply #12 on: April 03, 2023, 08:35:14 AM »
Yes!

"Is it possible to create DWGs in a previous version with the wblock command?"

this is the right way to express the concept!