samifox Posted February 1, 2023 Posted February 1, 2023 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 Quote
SLW210 Posted February 1, 2023 Posted February 1, 2023 WBLOCK is the same on Map3D 2022 and AutoCAD 2022. What version of MAP 3D? What command are you using? There is also ACADWBLOCKDIALOG. Quote
samifox Posted February 1, 2023 Author Posted February 1, 2023 When running wblock , it ask if i want to include AutoCAD map information. im after the normal wblock command Quote
BIGAL Posted February 1, 2023 Posted February 1, 2023 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) Quote
samifox Posted February 2, 2023 Author Posted February 2, 2023 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? Quote
tombu Posted February 2, 2023 Posted February 2, 2023 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>: Quote
BIGAL Posted February 2, 2023 Posted February 2, 2023 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. Quote
tombu Posted February 3, 2023 Posted February 3, 2023 (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. Quote
tombu Posted February 3, 2023 Posted February 3, 2023 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 "". 1 Quote
Steven P Posted February 3, 2023 Posted February 3, 2023 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 ) Quote
BIGAL Posted February 4, 2023 Posted February 4, 2023 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]" Quote
Recommended Posts
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.