Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. SLW210

    Revit -> PDF -> Autocad

    You need to search for convert Raster to Vector programs. You can use Raster Design on the image files, but still requires some work, it doesn't work on the PDFs though. If they refuse to properly create Vector PDFs or give you a .dwg, your only option is to do them in a separate Raster/Vector program, Raster Design or trace them in AutoCAD.
  3. Welcome aboard. The use of "C:" in a defun name implies the command name, so in code above type "Test" after loading. I would also rename "test" to something that you would call it. (defun c:test ............. ........ ) ; end defun add this a last line and it will run on load ) ; end defun (c:test)
  4. Ok the "add" is only needed if you start excel as it would normally ask to select a fiel including "Blank", if you have Excel already open it will find current workbook. I need to put the add in correct spot not sure why I did not do before. This should work just replace in code. ; Count will be 0 if no excel open but if no workbooks also may return same value. Nil names. ; So a double check count /=0 and wb not "" (princ "\nOpening Excel...") ;; Try to get or create Excel instance (setq myxl (vl-catch-all-apply 'vlax-get-or-create-object '("Excel.Application"))) (if (vl-catch-all-error-p myxl) (progn (prompt "\nError: Could not start Excel.") (exit) ) ) (if (= (vlax-get-property (vlax-get-property myXL 'WorkBooks) 'count) 0) (vlax-invoke-method (vlax-get-property myXL 'WorkBooks) 'Add) ) (vla-put-visible myXL :vlax-true) (vlax-put-property myxl 'ScreenUpdating :vlax-true) (vlax-put-property myXL 'DisplayAlerts :vlax-true)
  5. Today
  6. ILoveMadoka

    Revit -> PDF -> Autocad

    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.
  7. I have trouble with the model space viewport - it's on 1/3 of the screen. I try to slide it to enlarge it but it just keeps returning to the initial state. I tried turning all the viewports on and off, command "WSCURRENT", every classical way to resolve the issue but nothing works. The problem occured on a AUTOCAD2024 for MacBook Pro. Thank you in advance.
  8. Danielm103

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

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

    Revit -> PDF -> Autocad

    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.
  11. 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.
  12. mhupp

    XREF PATH - COPY TO CLIPBOARD

    Need to pull the effective block name and check it against the block table. That is where the path is stored. updated code.
  13. james9710

    XREF PATH - COPY TO CLIPBOARD

    Hi mhupp, Thank you for the response. the result says: ; error: ActiveX Server returned the error: unknown name: IsXRef
  14. Yesterday
  15. BIGAL

    Cursor color

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

    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.
  17. Lee Mac

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

    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).
  19. dexus

    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 )
  20. CharlieDFW

    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?
  21. 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
  22. 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!!
  23. Thanks EleenD03, glad you found it useful. Same logic could be leveraged for other object that internally contain MText.
  24. 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
  25. Last week
  26. 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) )
  27. BIGAL

    Hybrid parallel

    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.
  1. Load more activity
×
×
  • Create New...