All Activity
- Today
-
I do not have Revit or the original files. The PDFs were provided to me. I would LOVE the .dwg files but we may not be able to get them from a third party vendor.
-
Gabzie_20 joined the community
-
Danielm103 started following Create a stable true rectangle
-
Not too hard to create, a real pain to maintain as it must be compiled every time Autodesk decides to break binary compatibility
-
deneme joined the community
-
lido started following Cursor color
-
Try this. ;;Changing the color of CrossHair (transparent command) (DEFUN C:CHCOL (/ c d l m n o p) (setq c (quote ("Black" "Red" "Yelow" "Green" "Cyan" "Blue" "Magenta" "White" "8" "9")) l (quote ( 0 255 65535 65280 16776960 16711680 16711935 16777215 8421504 12632256)) d (vla-get-display (vla-get-preferences (vlax-get-acad-object))) m l o (vlax-variant-value (vlax-variant-change-type (if (= (getvar "TILEMODE") 0) (vla-get-layoutcrosshaircolor d) (vla-get-modelcrosshaircolor d) ) vlax-vbLong ) ) n (member o l) ) (cond ;;Rearrange list l with the First item = Current color from the list l ( (and n (/= o 0)) (setq l (append n (vl-remove-if (function (lambda (x) (member x n))) l))) ;;(v1 v2 n v3 v4 v5 ...) -> (n v3 v4 v5 ... v1 v2) ) ;;Add current color to lists ( (not n) (setq l (cons o l) m l c (cons (strcat (itoa (lsh (lsh o 24) -24)) "," (itoa (lsh (lsh o 16) -24)) "," (itoa (lsh o -16))) c) ) ) (T nil) ) (princ (strcat "\nCurrent color: " (nth (vl-position (car l) m) c) ". [Right Mouse Button/Enter Key/Space Key] to accept or any key to cycle CrossHair colors." ) ) (while (and (not (vl-catch-all-error-p (setq p (vl-catch-all-apply (function grread))))) ;;<Esc> (not (equal p (quote (2 13)))) ;;<Enter> (not (equal p (quote (2 32)))) ;;<Space> (/= (car p) 25) ;;Right mouse button ) (setq l (append (cdr l) (list (car l)))) (if (= (getvar "TILEMODE") 0) (vla-put-layoutcrosshaircolor d (car l)) (vla-put-modelcrosshaircolor d (car l)) ) (princ (strcat "\nCrossHair Color: " (nth (vl-position (car l) m) c))) ) (princ) ) ;;CHCOL
-
You need to properly set up Revit. PDF is not fully vectorized after exporting it from Revit "Revit will use raster printing because this view uses..." while printing a sheet to PDF format in Revit And check the links at the bottom of those pages. You should be able to Export to a .dwg if that's what you want.
-
arst joined the community
-
Need help reducing multiple oversized dimension text boxes at once
EleenD03 replied to 0misclose's topic in AutoCAD 2D Drafting, Object Properties & Interface
Had the same issue before - the quickest fix for me was just updating the DIMSTYLE and then using DIMUPDATE on the whole selection. It forces all the oversized boxes to follow the current style settings instead of whatever weird scaling they picked up. Select all your dims → type DIMUPDATE → done. Usually cleans things up in one go.- 13 replies
-
davidjason joined the community
-
AR.BG joined the community
-
lisp, place block on geometric center of polyline
AR.BG replied to hanskes's topic in AutoLISP, Visual LISP & DCL
-
pravinm joined the community
-
Need to pull the effective block name and check it against the block table. That is where the path is stored. updated code.
-
Hi mhupp, Thank you for the response. the result says: ; error: ActiveX Server returned the error: unknown name: IsXRef
-
Extracting data to excel from selected objects on different layers
animal1103 replied to Hsanon's topic in AutoLISP, Visual LISP & DCL
-
KSombo started following Lee Mac
-
YWY joined the community
- Yesterday
-
CBR joined the community
-
Options, Display, there is an item cross hair color, in Bricscad. Its X Axis color Y axis color. I run Black background so colors like red are good. No code required.
-
mhupp started following XREF PATH - COPY TO CLIPBOARD
-
Untested I remember Lee Mac saying it was important to release the html obj as it could cause a memory leak or something. ;;----------------------------------------------------------------------------;; ;; Copy Selected Xref Path to Clipboard with prompt. ;; https://www.cadtutor.net/forum/topic/98871-xref-path-copy-to-clipboard (defun c:XrefToClipBoard (/ SS Blk Path html) (vl-load-com) (if (setq SS (ssget "_+.:E:S" '((0 . "INSERT")))) (progn (setq blk (vla-get-effectivename (vlax-ename->vla-object (ssname SS 0)))) (setq blk (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object))) blk)) (if (= (vla-get-isxref blk) :vlax-true) (progn (setq Path (vla-get-Path blk)) (vlax-invoke (vlax-get (vlax-get (setq html (vlax-create-object "htmlfile")) 'ParentWindow) 'ClipBoardData) 'setData "Text" Path) (vlax-release-object html) (alert (strcat "\nPath Sent to Clipboard\n Xref Path: " Path)) ) (princ "\nSelected Block isn't an Xref.") ) ) (princ "\nNothing Selected") ) (princ) ) -edit updated code.
-
Lee Mac started following Cursor color
-
Some food for thought - https://www.theswamp.org/index.php?topic=56816.msg605115#msg605115 To obtain the colour numbers, you can use my RGB<->OLE conversion functions: https://lee-mac.com/colourconversion.html#rgbole
-
ILoveMadoka started following Revit -> PDF -> Autocad
-
I have a series of PDF sheets created from Revit. When I import a PDF sheet into Autocad, some sheets convert everything to autocad geometry while some other sheets only convert a few lines/text objects. The rest remain and are shown as raster images. What setting(s) controls whether a PDF is seen as vector vs raster by Autocad? Ideally, I'd like to get all the sheets in a PDF format that will import and convert everything in Autocad as usable entities. (I do not think they will convert it to a .dwg format for me).
-
dexus started following Cursor color
-
Its set in OLE_COLOR, so some color conversion might be necessary. Or you can hardcode the color by changing it in the settings and retrieving the color-code using the first code below. Here is how to get the current color: (if (setq dis (vla-get-display (vla-get-Preferences (vlax-get-acad-object)))) (vlax-variant-value (vlax-variant-change-type (vla-get-ModelCrosshairColor dis) vlax-vbLong)) ; Current color ) And this way you can change the cursor color: (if (setq dis (vla-get-display (vla-get-Preferences (vlax-get-acad-object)))) (vla-put-ModelCrosshairColor dis 255) ; Change to red )
-
CharlieDFW started following Cursor color
-
Cursorsize changes the size, cursortype will change to Windows style pointer. But there isn’t a cursorcolor. Is there a way to use lisp to change the cursor color?
-
Looking to the Future of Agentic AI with AutoCAD and Autodesk Assistant
The AutoCAD Blog posted a topic in AutoCAD Blogs
Without question, AI is a huge priority across Design and Make industries. According to the recently released State of Design & Make: Digital Transformation Pulse report, Design and Make organizations are overwhelmingly positive about the future of AI in their industry, with 74% saying it will have a positive impact on innovation and 92% currently using at least one AI tool. Autodesk is helping to provide the solutions required to take advantage of new AI-enabled workflows. Autodesk AI is embedded throughout Autodesk products with new workflows being added regularly. Integrating with Autodesk products, including AutoCAD (and eventually Autodesk model context protocol [MCP] servers), it provides a unified and collaborative experience with continuous access to critical data. Let’s take a look at how you can use Autodesk AI in AutoCAD today through Autodesk Assistant and where it’s going in the future. How Autodesk Assistant Enhances AutoCAD Today Today, Autodesk Assistant is your partner in doing more with AutoCAD. It can help with design tasks, help you learn about new features, and troubleshoot design challenges without leaving the workspace. You also can initiate a discussion with a support agent or submit a support case from within Autodesk Assistant. <?xml encoding="utf-8" ?> Looking to the Future of Agentic AI and AutoCAD In the future, Autodesk Assistant will be the unified entry point for Autodesk products, simplifying cross-product workflows with a context-aware intelligent assistant that offers access through one interface. Autodesk Assistant will grow with new capabilities as Autodesk develops trusted MCP services, CAD and physics-informed foundation models, and other Autodesk AI capabilities, exposing discrete functionalities embedded in Autodesk’s standalone software products. At AU 2025, attendees got a preview of this functionality during the AECO keynote. In AutoCAD, you’ll be able to analyze the submission against your drawing standards and get results right away, highlighting violations in layers, lines, text, and dimensions. No more tedious review for hours. You can have intelligent analysis in seconds. See the demo for yourself: <?xml encoding="utf-8" ?> Learn More Interested in learning more about Autodesk AI? Visit the Autodesk AI hub. The post Looking to the Future of Agentic AI with AutoCAD and Autodesk Assistant appeared first on AutoCAD Blog. View the full article -
Kamiran joined the community
-
Change MText Width (after width has been changed))
ILoveMadoka replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
Thank you all for the replies. Lee & Tsuky, Your code works perfectly for me. Steven P, thanks for explaining what was happening under the hood, made perfect sense. As always, I appreciate it greatly!! -
Need help reducing multiple oversized dimension text boxes at once
SanganakSakha replied to 0misclose's topic in AutoCAD 2D Drafting, Object Properties & Interface
Thanks EleenD03, glad you found it useful. Same logic could be leveraged for other object that internally contain MText.- 13 replies
-
hi, can anyone please assist creating a lisp to copy the "found at" path of selected xref to clipboard so i can paste the same to open the file in new autocad window. also I suggest to use command XPATH. the routine would be like: 1. command: XPATH 2. select an XREF 3. message: "found at path copied to clipboard". 4.(command end) Thanks a lot. James
- Last week
-
Change MText Width (after width has been changed))
Tsuky replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
Your code modified (defun C:MTW ; = MText Width (/ ss wf n mt val_text start end) (if (and (setq ss (ssget "_:L" '((0 . "MTEXT")))) (setq wf (getreal "\nWidth Factor to apply: ")) ); and (repeat (setq n (sslength ss)); then (setq mt (ssname ss (setq n (1- n)))) (setq val_text (getpropertyvalue mt "Contents")) (cond ((vl-string-search "{" val_text) (cond ((vl-string-search "\\W" val_text) (setq start (vl-string-search "\\W" val_text) end (vl-string-search ";" val_text 1) ) (repeat (1+ (- end start)) (setq val_text (vl-string-subst "" (chr (vl-string-elt val_text start)) val_text start)) ) (setpropertyvalue mt "Contents" val_text) ) (T (setpropertyvalue mt "Contents" (strcat "{\\W" (rtos wf 2) ";" (vl-string-left-trim "{" val_text) ) ) ) ) ) (T (setpropertyvalue mt "Contents" (strcat "{\\W" (rtos wf 2) ";" (getpropertyvalue mt "Contents") "}") ); setpropertyvalue ) ) ); repeat ); if (princ) ) -
I think with those big side offshoots you need to break the river into multiple plines so you would have two or more centrelines lines in that situation. As suggested by @SLW210 The problem will be how to work out the break offset shape.. Ps image dummied up.
-
Lee Mac started following Change MText Width (after width has been changed))
-
Change MText Width (after width has been changed))
Lee Mac replied to ILoveMadoka's topic in AutoLISP, Visual LISP & DCL
This should achieve the desired result without overriding nested width formatting - (defun c:mtw ( / enx idx sel str wid ) (initget 6) (cond ( (not (setq wid (getreal "\nSpecify new width factor: ")))) ( (setq sel (ssget "_:L" '((0 . "MTEXT")))) (repeat (setq idx (sslength sel)) (setq idx (1- idx) enx (entget (ssname sel idx)) str (assoc 1 enx) ) (entmod (subst (cons 1 (addupdatewidth (cdr str) wid)) str enx)) ) ) ) (princ) ) (defun addupdatewidth ( str wid / ps1 ps2 ps3 ) (cond ( (= "" str) str) ( (and (setq ps1 (vl-string-search "{\\W" str)) (setq ps2 (vl-string-search ";" str ps1)) (setq ps3 (vl-string-search "}" str ps2)) ) (strcat (addupdatewidth (substr str 1 ps1) wid) (substr str (1+ ps1) 3) (rtos wid 2) (substr str (1+ ps2) (- ps3 ps2 -1)) (addupdatewidth (substr str (+ ps3 2)) wid) ) ) ( (strcat "{\\W" (rtos wid 2) ";" str "}")) ) ) (princ) -
Can I read and copy Dynamic Block properties to another block reference?
BIGAL replied to p7q's topic in AutoLISP, Visual LISP & DCL
Google "create dynamic block with flip parameter autocad" it was hinted to in the link by Lee. Got some helpful information. Not tested as I use Bricscad which at moment struggles to edit Acad dynamic blocks. To be fixed soon. -
AutoCAD Dimension Settings: Tuesday Tips With Frank
The AutoCAD Blog posted a topic in AutoCAD Blogs
There’s nothing I love more than presenting an exciting topic to our Tuesday Tip readers, so today I’m talking about AutoCAD Dimension Settings. By my count, there are 95 dimension variables. So, sit back and relax, as I work my way through them all. I’m kidding. I’ll be touching on very small percentage of what I consider to be some of most important. Plus, I’ll be using their description from the Modify Dimension Style dialog, instead of the actual dimension variable name. To be honest, most of us never think about the variables that make up your dimension style. And, if set up right, there should be no reason for you to do so. Outside of choosing a different style to use, you may not even be aware of what the Modify Dim Style dialog looks like. If that’s you, you’re in luck. The animation below cycles through the seven tabs at the top of the dialog. You should also note that in each tab, there is a preview box in each, always in the same place, the upper right corner. If you’re of a certain experience level like me, you’ll know what a big deal that is. The Important Stuff About AutoCAD Dimension Settings I’d say at least 90% of the AutoCAD Dimension Settings you’ll find in the Modify dialog control what the dimension object looks like. What terminators are you using? What’s the gap between the object and the dimension line? Where and how is the dimension’s text place? Things like that. Others control how they function, and the settings I’ll be talking about fall into that category. First, in the Text tab, is the text style. The currently active text style may not necessarily match the style that the dim style uses. They are not connected, so it’s important that they match – if that’s what you want. I’ve seen it both ways (usually matching). I’ve been around the CAD block long enough to have worn a path, so in general, I’ve seen it all – or at least a whole lot. Below that, you’ll find Text Height. This setting goes directly to your CAD Standard. It’s the actual height of the dimension text. 3/32” and 1/8” are extremely common when using Imperial units. The next two settings are directly responsible for how your dimensioning method functions. The oldest method (yet still in use today), is to place your dimensions into model space, scaled up to the intended plot scale of the model, where the scale is the inverse value of the drawing’s scale. For instance, if the scale is to be 1/8”=1’-0” when plotted, the inverse scale would be 96. That’s the overall scale setting that we see in the next image. That means all of your dimension features get scaled up 96 times, so that when it gets plotted to scale, everything will be the right size. Like I said, that method is about as old as AutoCAD itself, literally before paper space, so all we had was scaling up the dimensions in model space (which didn’t even have that name until paper space came along). It was either that, or draw the model to scale as you would have done in the days of board drafting. Not really an optimal solution. Now we have more modern methods. If you want to use Annotative dimensions, this is where you’ll set it to do so. Checking the Annotative box will disable the two radio buttons below it. If you want the scale of the paper space viewport to control the feature scaling, choose the top radio button. If you want to go old school, this is where you’ll enter the scale value. The next one is found in the Primary Units tab. This is typically a point of confusion for new users. Quite simply, the units used in your dimension style do not automatically correspond to the overall units defined in your drawing. If you want them to match, which you probably do, you have to set them here as well. At the bottom is Measurement scale. Typically, since you’re drawing at 1:1 scale, you’ll leave this at 1.0. But if your drawing is drawn to scale for some reason, let’s say it’s a tiny part, and you’ve scaled it up 2x, you’d want to set the scale factor to .50 Do you use Alternate Units in your dimensions? If you do, chances are that it’s probably metric. You’ll need to turn the feature on in the Alternate Units tab using the checkbox at the top. Then make sure the multiplier is set correctly. By default it’s already set to 25.4 for metric. If you’re using something else, this is where you’ll set that value. One More Thing About AutoCAD Dimension Settings There’s one other dimension variable that is very important, but it’s not part of your dimension style. It’s a system variable called DIMASSOC. It can be set to either 0, 1, or 2. The default is 2. That means that the definition points of the dimension object are associated to the object’s geometric points. Stretch the object, and the dimension updates. A setting of 1 does not associate the dimension to the geometry, and 0 (zero) creates in essence an exploded dimension. I’m not sure why you’d want to do that, but you do you. This variable is saved in the drawing, so it’s not one of those set it once and it stays that way. Looking Ahead For my next Tuesday Tips, I’ll be looking at editing existing dimensions. In fact, while discussing dimensioning variables here, along with various methods, I’ve got another topic in mind for you. After that, I’ll discuss some of the more important things you should find in your CAD Standards, so stay tuned! More Tuesday Tips Check out our whole Tuesday Tips series for ideas on how to make AutoCAD work for you. The post AutoCAD Dimension Settings: Tuesday Tips With Frank appeared first on AutoCAD Blog. View the full article -
AutoCAD Dimension Settings: Tuesday Tips With Frank
The AutoCAD Blog posted a topic in AutoCAD Blogs
There’s nothing I love more than presenting an exciting topic to our Tuesday Tip readers, so today I’m talking about AutoCAD Dimension Settings. By my count, there are 95 dimension variables. So, sit back and relax, as I work my way through them all. I’m kidding. I’ll be touching on very small percentage of what I consider to be some of most important. Plus, I’ll be using their description from the Modify Dimension Style dialog, instead of the actual dimension variable name. To be honest, most of us never think about the variables that make up your dimension style. And, if set up right, there should be no reason for you to do so. Outside of choosing a different style to use, you may not even be aware of what the Modify Dim Style dialog looks like. If that’s you, you’re in luck. The animation below cycles through the seven tabs at the top of the dialog. You should also note that in each tab, there is a preview box in each, always in the same place, the upper right corner. If you’re of a certain experience level like me, you’ll know what a big deal that is. The Important Stuff About AutoCAD Dimension Settings I’d say at least 90% of the AutoCAD Dimension Settings you’ll find in the Modify dialog control what the dimension object looks like. What terminators are you using? What’s the gap between the object and the dimension line? Where and how is the dimension’s text place? Things like that. Others control how they function, and the settings I’ll be talking about fall into that category. First, in the Text tab, is the text style. The currently active text style may not necessarily match the style that the dim style uses. They are not connected, so it’s important that they match – if that’s what you want. I’ve seen it both ways (usually matching). I’ve been around the CAD block long enough to have worn a path, so in general, I’ve seen it all – or at least a whole lot. Below that, you’ll find Text Height. This setting goes directly to your CAD Standard. It’s the actual height of the dimension text. 3/32” and 1/8” are extremely common when using Imperial units. The next two settings are directly responsible for how your dimensioning method functions. The oldest method (yet still in use today), is to place your dimensions into model space, scaled up to the intended plot scale of the model, where the scale is the inverse value of the drawing’s scale. For instance, if the scale is to be 1/8”=1’-0” when plotted, the inverse scale would be 96. That’s the overall scale setting that we see in the next image. That means all of your dimension features get scaled up 96 times, so that when it gets plotted to scale, everything will be the right size. Like I said, that method is about as old as AutoCAD itself, literally before paper space, so all we had was scaling up the dimensions in model space (which didn’t even have that name until paper space came along). It was either that, or draw the model to scale as you would have done in the days of board drafting. Not really an optimal solution. Now we have more modern methods. If you want to use Annotative dimensions, this is where you’ll set it to do so. Checking the Annotative box will disable the two radio buttons below it. If you want the scale of the paper space viewport to control the feature scaling, choose the top radio button. If you want to go old school, this is where you’ll enter the scale value. The next one is found in the Primary Units tab. This is typically a point of confusion for new users. Quite simply, the units used in your dimension style do not automatically correspond to the overall units defined in your drawing. If you want them to match, which you probably do, you have to set them here as well. At the bottom is Measurement scale. Typically, since you’re drawing at 1:1 scale, you’ll leave this at 1.0. But if your drawing is drawn to scale for some reason, let’s say it’s a tiny part, and you’ve scaled it up 2x, you’d want to set the scale factor to .50 Do you use Alternate Units in your dimensions? If you do, chances are that it’s probably metric. You’ll need to turn the feature on in the Alternate Units tab using the checkbox at the top. Then make sure the multiplier is set correctly. By default it’s already set to 25.4 for metric. If you’re using something else, this is where you’ll set that value. One More Thing About AutoCAD Dimension Settings There’s one other dimension variable that is very important, but it’s not part of your dimension style. It’s a system variable called DIMASSOC. It can be set to either 0, 1, or 2. The default is 2. That means that the definition points of the dimension object are associated to the object’s geometric points. Stretch the object, and the dimension updates. A setting of 1 does not associate the dimension to the geometry, and 0 (zero) creates in essence an exploded dimension. I’m not sure why you’d want to do that, but you do you. This variable is saved in the drawing, so it’s not one of those set it once and it stays that way. Looking Ahead For my next Tuesday Tips, I’ll be looking at editing existing dimensions. In fact, while discussing dimensioning variables here, along with various methods, I’ve got another topic in mind for you. After that, I’ll discuss some of the more important things you should find in your CAD Standards, so stay tuned! More Tuesday Tips Check out our whole Tuesday Tips series for ideas on how to make AutoCAD work for you. The post AutoCAD Dimension Settings: Tuesday Tips With Frank appeared first on AutoCAD Blog. View the full article
