Jump to content

wblock command in MAP


Recommended Posts

Posted

hi

wblock command in MAP has additional prompts, the vanila autocad doesn't. 

Is there a system variable to suppress those additional prompts, so the command would behave exactly as in vanila AutoCAD?

 

Thanks

Shay

Posted

WBLOCK is the same on Map3D 2022 and AutoCAD 2022. What version of MAP 3D?

 

What command are you using?

 

There is also ACADWBLOCKDIALOG.

Posted

When running wblock , it ask if i want to include AutoCAD map information. 

im after the normal wblock command

Posted

samifox did you double post ? See other post.

 

SLW210 CIV3D 2020 yes "Do you want to include Map information" I was looking for the version codes for plain Autocad v's Civ3D.

 

(vlax-product-key) 

 

Posted
18 hours ago, TRogers said:

WBLOCK in Civil 3D is the AutoCAD WBLOCK. There is nothing different. What are you seeing?

 

18 hours ago, SLW210 said:

WBLOCK is the same on Map3D 2022 and AutoCAD 2022. What version of MAP 3D?

 

What command are you using?

 

There is also ACADWBLOCKDIALOG.

ACADWBLOCKDIALOG also ask that question. i have a batch proccess and that question corrupt it. is there a way the disable that question?

Posted

Jimmy Bergmark has a workaround in his LayoutsToDwgs.lsp if you're looking for a code example.

Handle Map prompt with WBLOCK ;;; Include AutoCAD Map information in the export? [Yes/No] <Y>:

Posted

tombu that link still asks the question Y or N so code will error say in Bricscad. As I asked before need some way of knowing is it CIV3D or Autocad current session.

 

(vlax-product-key) "Software\\Autodesk\\AutoCAD\\R23.1 this is CIV3D 2020 running

(vlax-product-key) "Software\\Bricsys\\BricsCAD\\V20x64\\en_US"

 

Please post what (vlax-product-key) returns and Acad version it may be country dependent.

Posted

(vla-get-Caption (vlax-get-acad-object)) returns the Caption displayed at the top of the screen in AutoCAD like: "Autodesk Civil 3D 2023 - [Drawing1.dwg]" or "Autodesk AutoCAD Map 3D 2023 - [Drawing1.dwg]" or "Autodesk AutoCAD 2021 - [Drawing1.dwg]"

 

(vla-get-Caption (vlax-get-acad-object))
"Autodesk AutoCAD Map 3D 2023 - [Drawing1.dwg]"
Command: (vlax-product-key)
"Software\\Autodesk\\AutoCAD\\R24.2\\ACAD-6102:409"
 

(vla-get-Caption (vlax-get-acad-object))
"Autodesk AutoCAD 2021 - [Drawing1.dwg]"
Command: (vlax-product-key)
"Software\\Autodesk\\AutoCAD\\R24.0\\ACAD-4101:409"
 

(vla-get-Caption (vlax-get-acad-object))
"Autodesk Civil 3D 2023 - [Drawing1.dwg]"
Command: (vlax-product-key)
"Software\\Autodesk\\AutoCAD\\R24.2\\ACAD-6100:409"
 

Doing a string search of (vla-get-Caption (vlax-get-acad-object)) for "3D" or (vlax-product-key) for "ACAD-6" would work for to test for a "Map 3D" vertical that would require the additional prompt on my PC but there's a lot of verticals I don't have or use.

Posted

Just use (if(ade_projgetwscode) for the test.

In AutoCAD it returns "; error: no function definition: ADE_PROJGETWSCODE" since only a Map vertical can have a Map Projection set, even if one isn't set in Map it will return "".

  • Like 1
Posted

This was posted the other day, plotting to PDF where it runs the command and the user does inputs - though in this case it is all filled in. I haven't played with this yet but the relevant part is the 'if' at the end to complete the command

 

So changing it about to be wblock and not plot, use a pause for user inputs and at the end the 'if' as this example should get it to behave as a standard wblock ?

 

(I haven't tried this out though)

 

 

;;https://www.cadtutor.net/forum/topic/76715-plot-pdf-save/
(command "-plot" "yes" (car x) "DWG TO PDF.PC3" "ISO full bleed A4 (297.00 x 210.00 MM)" "Millimeters"
         "Portrait" "No" "Window" llpt urpt "Fit" "Center" "yes" "monochrome.ctb" "yes" "" )
(if (/= (car x) "Model")
  (command "No" "No" file "no" "Yes") ; pspace
  (command file "no" "Yes") ; model
)

 

Posted

tombu both good ideas and a solution. I think using wcmatch will be much easier than trapping the error.

 

(vla-get-Caption (vlax-get-acad-object))
"BricsCAD Pro - [Drawing1]"

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...