Jump to content

Search the Community

Showing results for tags 'xref'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

  1. HI there, Am working on an AutoCAD LT drawing with several XREFs. I have been hatching some small areas and, last click of the day (isn't is always) one of the hatched areas appeared to leave the defined boundary and created a new hatch ALL OVER the main drawing, referncing multiple areas on the top survye XREF below - not just one area, but hundreds of them - all the way down the length of the Road. Every time i click on these hatches the whole drawing freezes and crashes. When the freeze stops after a few minutes, you can see that it has selected the entire xref layer - all of the lines and grips from the xref have been selected. Even though it's detached. And i mean ALL the lines and grips - not just those that seemt o be associate with the weird hatching. I have detached the xref, hoping that they would disappear, but they remain on the main drawing (all of the x ref lines disappear, but the hatches remain visisble. What's also strange is that the main drawing still displays the 'xref' layer i had used - but whe i go to 'laydel' list to try and remove it all completely fromt he drawing, that layer is missing from the list. If i reattch the survey - it appears in the 'laydel' list again. Have uploaded four images here - one with the xref attached, one with it detached (you can see all the grey hatch shaps more easily, scattered along the road length) and one image showing the layer XREF1 which held the xref, and then the laydel options where that layer is just missing - at the same time it is in use on the drawing. Then the last image shows all the lines and grips selected after the few minutes wait, when i have clicked on the hatched area and it has frozen - even though that XREF is detached (so not there, right?). How is the main drawing still referencing those xref lines even though it's not there? And on a layer i can't delete? How do i fix!? Hope this all makes sense...
  2. bachrock

    Text Won't Rotate

    This mtext won't rotate. When I use the rotate command, the text moves around a point, but stays right side up the whole time. I remember this happening with xrefs as well. Anyone know what's happening here?
  3. Hi all, When using certain commands, my command line repeatedly displays "The object is an external reference" when mousing over an external reference. For example, if I use the Line command, and go to snap over part an external reference, the command line will display "The object is an external reference" when I mouse over any part of the reference, quickly filling up my command line box. This is particularly painful if I have just used the distance command, and am using the info straight out of the command line box. I have looked for xref commands that might be to blame, but have had no luck. Any thoughts? Thanks in advance!
  4. We have some drawings where we've xref'd floor plans of adjacent buildings and annotated it with leaders (in model space) inside of a master file (eg Bldg1-1st flr, Bldg2-1st flr, Bldg3-1st flr all xref'd into Master1stflr.dwg). The individual floor plans contain a hatch layer color coding each room on the plans indicating departmental ownership. The leaders are all drawn on one layer called MC-TEXT in the master file. Our problem is the the leader annotations show up above the xref when drawn, but upon reloading the xref or re-opening the master file, the xref jumps to the front and covers up the leaders. I've tried to send the leaders to the front and the xref's to the back to no avail. Is there a command I can apply the in the master drawing that will hold the draw order upon xref reloading? Should I be pushing the xref's to the back or the leaders to the front? Is there a way to set draworder of layers? When invoking the draworder command, how do I call out a specific xref to push to back (without selecting the object with cursor...eg send Bldg1-1st flr xref to back)? Thanks for any advice in advance. Steve
  5. Hello Everyone, I am trying to align simple objects (line circles, etc) and blocks to lines that exist in a xref'd file. An example is if I have a general arrangement floor plan (that has been produced and owned by others in my team). I would like to create a set of dynamic drawings that would change with changes to the general arrangement drawing. I understand that the original author can add, delete and redraw lines that I have aligned to, however I will address these as they occur.
  6. We regularly export Civil3D files to CAD so we can use them in either CAD and Revit. We have run into a few problems with this workflow, since any xrefs that aren't detached before exporting become blocks in the CAD file. Additionally, Revit automatically enables all the layers when you insert the CAD file, so you have to manually disable them again. I have created a simple lisp that detaches the xrefs and deletes the listed layers using code I pulled from various forums. However, I've got two issues: 1. The dellayers function claims to delete the DR_X_Text layer, but the layer and the entities on that layer remain in my drawing after running the command. 2. I'd like to princ the list of removed xrefs as well, but I'm not sure where to place that code. (defun c:Civil3DtoCAD (/) (c:detachxrefs) (c:dellayers) (princ) ) (defun c:dellayers (/ e) (foreach layer '("DR_X_Text" "_11-2606G1K-1-24" "_11-2607G1K-1-24" "_11-2608G1K-1-24") (if (setq e (tblobjname "layer" layer)) (progn (vl-catch-all-apply 'vla-delete (list (vlax-ename->vla-object e))) (princ "Layer ") (princ layer) (princ " deleted.\n") ) (progn (princ "Layer ") (princ layer) (princ " not found.\n") ) ) ) (princ) ) (defun C:Detachall (/ *error* mip:layer-status-restore mip:layer-status-save delete-xref-img-underlay delete-all-dict ) (vl-load-com) (defun *error* (msg) (mip:layer-status-restore) (princ msg) (princ) ) ;_ end of defun (defun mip:layer-status-restore () (foreach item *PD_LAYER_LST* (if (not (vlax-erased-p (car item))) (vl-catch-all-apply '(lambda () (vla-put-lock (car item) (cdr (assoc "lock" (cdr item)))) (vla-put-freeze (car item) (cdr (assoc "freeze" (cdr item))) ) ;_ end of vla-put-freeze ) ;_ end of lambda ) ;_ end of vl-catch-all-apply ) ;_ end of if ) ;_ end of foreach (setq *PD_LAYER_LST* nil) ) ;_ end of defun (defun mip:layer-status-save () (setq *PD_LAYER_LST* nil) (vlax-for item (vla-get-layers (vla-get-activedocument (vlax-get-acad-object)) ) ;_ end of vla-get-layers (setq *PD_LAYER_LST* (cons (list item (cons "freeze" (vla-get-freeze item)) (cons "lock" (vla-get-lock item)) ) ;_ end of cons *PD_LAYER_LST* ) ;_ end of cons ) ;_ end of setq (vla-put-lock item :vlax-false) (if (= (vla-get-freeze item) :vlax-true) (vl-catch-all-apply '(lambda () (vla-put-freeze item :vlax-false)) ) ;_ end of vl-catch-all-apply ) ;_ end of if ) ;_ end of vlax-for ) ;_ end of defun (defun delete-xref-img-underlay (/ count txt) (mip:layer-status-save) (vlax-for Blk (vla-get-Blocks (vla-get-activedocument (vlax-get-acad-object)) ) ;_ end of vla-get-Blocks (if (and (= (vla-get-IsXref Blk) :vlax-false) (not (wcmatch (vla-get-name Blk) "*|*")) ) ;_ end of and (progn (setq count 0 txt (strcat " Erase Xref and Underlay in " (vla-get-name Blk) ) ;_ end of strcat ) ;_ end of setq (grtext -1 txt) (vlax-for Obj Blk (setq count (1+ count)) (if (zerop (rem count 10)) (grtext -1 (strcat txt " : " (itoa count))) ) ;_ end of if (if (and (vlax-write-enabled-p Obj) (or (and ;_ XREF (= (vla-get-ObjectName obj) "AcDbBlockReference") (vlax-property-available-p Obj "Path") ) ;_ end of and (and ;_ UNDERLAY (wcmatch (vla-get-ObjectName obj) "*Reference") (vlax-property-available-p Obj "UnderlayName") ) ;_ end of and (= (vla-get-ObjectName obj) "AcDbRasterImage") ;_ IMAGE ) ;_ end of or ) ;_ end of and (VL-CATCH-ALL-APPLY 'vla-Delete (list Obj)) ) ;_ end of if ) ;_ end of vlax-for ) ;_ end of progn ) ;_ end of if ) ;_ end of vlax-for (mip:layer-status-restore) ) ;_ end of defun (defun delete-all-dict (dict) ;;; dict - dict name (like "ACAD_IMAGE_DICT", "ACAD_PDFDEFINITIONS" ... ) (vl-catch-all-apply '(lambda () (vlax-map-Collection (vla-item (vla-get-dictionaries (vla-get-activedocument (vlax-get-acad-object)) ) ;_ end of vla-get-dictionaries dict ;_ "ACAD_IMAGE_DICT" ) ;_ end of vla-Item 'vla-delete ) ;_ end of vlax-map-Collection ) ;_ end of lambda ) ;_ end of vl-catch-all-apply ) ;_ end of defun (vl-load-com) (delete-xref-img-underlay) (command "_-xref" "_d" "*") (while (> (getvar "CMDACTIVE") 0) (command)) (mapcar 'delete-all-dict (list "ACAD_IMAGE_DICT" "ACAD_PDFDEFINITIONS" "ACAD_DWFDEFINITIONS" "ACAD_DGNDEFINITIONS" ) ;_ end of list ) ;_ end of mapcar (command "_.regenall") (command "_.externalreferences") (princ) ) ;_ end of defun (defun c:detachxrefs ( / block-lst xref-lst nxt-blk n) (PROGN (SETQ block-lst (LIST (TBLNEXT "BLOCK" T))) (SETQ xref-lst NIL) (WHILE (SETQ nxt-blk (TBLNEXT "BLOCK")) (SETQ block-lst (APPEND block-lst (LIST nxt-blk))) ) ;_ end of WHILE (FOREACH n block-lst (IF (AND (ASSOC 70 n) (EQ (BOOLE 1 4 (CDR (ASSOC 70 n))) 4)) (SETQ xref-lst (APPEND xref-lst (LIST (LIST (CDR (ASSOC 2 n)) (CDR (ASSOC 1 n))) ) ;_ end of LIST ) ;_ end of APPEND ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of FOREACH (IF xref-lst (c:detachall) (PROGN (PRINC "\nNo References to Detach... ") (PRINC) ) ) ;_ end of IF (PRINC) ) ;_ end of PROGN ) ;_ end of defun
  7. Hi, I have a drawing that incorporates a number of Multileaders that consist of a rectangle with some text inside and a background mask. This drawing is then Xref'd into another drawing.The issue I'm having is that in the main drawing I have frozen some of these. However, the background mask is still showing on the plotted drawings. I've tried to "Select All" to see if something shows up in the drawing, but to no avail. Any ideas? Thanks.
  8. will there ever be a day where inserting a pdf underlay into autocad doesn't slow it down or am I doing something wrong? I would rather not degrade the quality and make it a jpg
  9. Using Autocad Arch. 2014 I am new to sheet sets so here is what I want to be able to do. My architectural drawings has a line for Issue Date. I want to be able to change the Issue Date only once and have all of the sheets "Issue Dates" updated. What I am currently having to do is to change the dates manually of each sheet. Waste of time and completely inefficient. Can or should I xref a date field somehow and place it on my template before making a sheet set template. Or is there some other way of easily updating the Issue Date field just once and all of the other sheets will update automatically. Can this be done in a sheet set? Thanks to all
  10. Alan_KD

    XREF layer

    Hello everyone, I have been developing some routines for the pas 6 months, so my knowledge is not very high. Normally I manage to find answers online, thanks to all of you who share their knowledge, it's so helpful. I am writing a routine which would: Compare the XREF name on the drawing and the XREF 'real' file name and match them (on the drawing) if different. After the code checks if the XREF name matches a specific formatting and if it does creates a layer based on it (if the layer does not already exist). The final step is to change the XREF layer to that one, and here is where I am getting an error. I tried with different ways to do this and always got an error. I guess I could try to get this done without using vl code but this is really puzzling me and I would like to know why is actually not working, I dont see where the code could have gone wrong. The example names of my XREFs: which are used to compare with the wcmatch "*_*_*_*" XREF_TGLMTE_PRO_INTER_BASSINS_01 XREF_TGLMTE_PRO_INTER_RESEAUX_HS_2025_01 XREF_TGLMTE_PRO_TRC_V5_IND_D I used different lines of code to try to achieve this, as you can see on my commented lines on the code. I am currently using a (vlax-put-property it2 'layer strcalq) inside a vlax-for getting the following error: (defun c:xrcalque (/ AcadObj AcadAct LyAct it2 xrobjectname strcalq) (vl-load-com) (setq *error* ABD:Error) (setq AcadObj (vlax-get-Acad-Object)) (setq AcadAct (vla-get-ActiveDocument AcadObj)) (setq LyAct (vla-get-layers AcadAct)) ;get layers from Active document (xrn AcadObj AcadAct); runs the subroutine to change XREF name on drawing to match XREF file name (vlax-for it2 (vla-get-blocks AcadAct) (setq ind1 3) (setq ind2 0) (setq ind3 0) (if (= (vla-get-isxref it2) :vlax-true) (progn (setq xrobjectname (vl-filename-base (vla-get-name it2))) (if (wcmatch xrobjectname "*_*_*_*"); (progn (repeat ind1 (setq ind3 (+ ind2 1)) (setq ind2 (vl-string-position (ascii "_") xrobjectname ind3));gets firs position of "_" character ) (print xrobjectname) (setq ind2 (+ ind2 2)) (print ind2) ; ind2 is the position of the ind1 "_" element (3rd) to count from there to have the layer name (setq ind4 (vl-string-position (ascii "_") xrobjectname nil T)); last "_" position (setq ind5 (vl-string-position (ascii "-") xrobjectname nil T)); last "-" position (if (> ind4 ind5)(setq indlst ind4)(setq indlst ind5)) ;check which one is bigger (setq indlst (+ 1 indlst)) (setq strcalq (strcat "SF-XREF_"(substr xrobjectname ind2 (- indlst ind2)))) ;Create layer with string from ind2 position to ind4 or ind5 position (strcalq) (print strcalq) (if (not (tblsearch "LAYER" strcalq));checks non existance of layer (progn (vla-add LyAct strcalq) (print "Layer has been created") ) (progn ;(vla-put-layer it2 "0") ; (print "this is a test4") (print "layer exists") ;if layer exists put object on layer ) );if (print strcalq) ;(vla-put-layer it2 "0") ;(vla-put-layer xrobjectname strcalq) ;(vla-put-layer (vla-get-name it2) strcalq) ;(vlax-put it2 'Layer "0") ;(vlax-put (vlax-ename->vla-object (vla-get-name it2)) 'Layer "0") (vlax-put-property it2 'layer strcalq);############ ERROR############### );progn (print "wcmatch xref name not matching") );if );progn );if ;(vlax-put (vlax-ename->vla-object xrtemp) 'Layer strcalq) );vlax for (print "highly recommended to purge layers") ;add code to purge automatically the layers? (princ) );defun ;;;======================================= Error function ++++++++++++++++++++++++++++++++++++++++;;; (defun ABD:Error (st) (if (not (member st (list "Fonction annulée" "quitter / sortir abandon"))) (vl-bt) );if ;(princ "Merci d'envoyer vos commentaires ou report d'erreurs à ") (princ);clean exit ? );defun error ;;;======================================= function xrn +++++++++++++++++++++++++++++++++++++++++++;;; (defun xrn (AcadObj AcadAct / item xrobjectnamexrn xrfilenamexrn) (vlax-for item (vla-get-blocks AcadAct) (if (= (vla-get-isxref item) :vlax-true) (progn (setq xrobjectnamexrn (vl-filename-base (vla-get-name item))) (setq xrfilenamexrn (vl-filename-base (vla-get-path item))) (if (/= xrobjectnamexrn xrfilenamexrn) (progn (vla-put-name item xrfilenamexrn) (vla-reload item) ) ) ) ) ) );defun xrn If someone could explain why this is not working, and please share a way to achieve my goal would be awesome! Thank you in advance, Alan
  11. Tim S

    WBlock + xref

    Is there a way to create a block that includes xref files? WBlock only includes the DWG and not the xref.
  12. Hi all, I have a script taken from here which I've tweaked to get the count. (defun C:XREFCNT (/ i x) (setq i 0) (vlax-for x (vla-get-blocks (vla-get-ActiveDocument (vlax-get-acad-object)) ) (if (eq (vla-get-IsXref x) :vlax-true) (setq i (1+ i)) ) ) i ) XREFCNT returns the number in the commandline. How do I then do an alert, the code below doesn't work. It errors with: error: bad argument type: fixnump: # (if XREFCNT > 0) (alert (strcat "Number of External Reference Drawings = " (itoa (strcat XREFCNT))) )
  13. Hi guys, Long time reader, seldom if ever poster. I think I've got a good one this time and can't find a solution. I'm seeking to find and replace strings in hundreds of xref paths. It's not the path I need to change, but a string in the name of the drawing. For example: "otl" should be found and replaced with "int" *\PLANS\p_otl_001.dwg -> *\PLANS\p_int_001.dwg *\PLANS\p_otl_002.dwg -> *\PLANS\p_int_002.dwg I can quickly change the reference name using RENAME and the Reference Manager can change all paths, but affects only the file path and not the name of the drawing. REDIR with * wildcards doesn't work either. I've searched for hours for a script that will achieve this but I cannot seem to find one. Has anyone found a solution to this before? (I'll buy you many beers first chance I get.) Using AutoCAD Architecture 2012.
  14. Greetings, Im working on a test lisp to see if I can automate binding an existing xref & converting a bounded block reference back into an xref. while I was able to automate bind, I realized the express tool (-blocktoxref) is incompatible with lisp as it cant seem to find the command. Then I created a script that allows me to set up an open command, but I cant seem to use my local variables (BLKNAME & NEWFILEPATH) with the script command. So my question is, Is it possible to write a script via lisp? and if so how? (defun c:ws_Layer_copy () (vl-load-com) (setq en (ssget "x" '((0 . "insert") (8 . "XREF - ELECTRICAL - 1")))) (setq ent (ssname en 0)) (setq EN (entget ent)) (setq layno (vl-string-left-trim "XREF - ELECTRICAL - " (cdr(assoc 8 EN)))) (setq dwgpath (getvar "dwgprefix")) (setq dwgname (getvar "dwgname")) (setq nametrim (vl-string-right-trim "HVAC LAYOUT.dwg" dwgname)) (if (= layno "1") (setq layname "1st") ) (if (= layno "2") (setq layname "2nd") ) (if (= layno "3") (setq layname "3rd") ) (if (= layno "4") (setq layname "4th") ) (if (= layno "5") (setq layname "5th") ) (setq newfilepath (strcat nametrim layname " Floor Electrical" )) (setq blkname (vl-string-left-trim dwgpath newfilepath)) (command "-xref" "bind" newfilepath ) ;---------------------------------------------------------------------- (command "script" "blocktoxref.scr" ) )
  15. Is there one in autocad 2016? I just want to switch reference file on and off to see which ones I need to keep. Microstation had this excellent feature at least as far back as 1994. Has autocad caught up yet?
  16. Hi all, I get a pop-up in the middle of a e-transmit saying "Etransmit creation failed!". It's only happening with one file. I've done purge all, audit, rebooted computer,etc. I did the same with the attached xref. The xref are also located in other files that I have no problem with e-transmit, so I doubt their the problem. If anyone has a clue what causes this it would be helpful.
  17. Hi all! So, lets say I have drawing "A" as an xref in drawing "B". I then want to xref drawing "B" in drawing "C". If I don't want "A" to show up in "C", I simply make sure that it's an overlay not an attachment in "B". All good. Now let's say that there are also a bunch of pictures (jpeg files) xref'd into "B". If I don't want these showing up in "C", there doesn't appear to be the option to make them overlays like with dwg files. So, is it possible to xref a drawing that has xref'd images without pulling those along too? Thanks!
  18. Hey Everyone, Hope everyone is doing well. I was leery on posting this but I feel like the whole point of this forum is to share knowledge so hopefully I can be more efficent at my job. So, lets get started. I have to label contours that are in model space. I know that Civil 3D allows you to label contours that are in a surface but is there a way to label just regular polylines that are an XREF? The way that I currently do it is run the POLYLINE command snap to the contour, look at the properties to get the elevation, edit my text to the appropriate elevation, run my much appreciated LEE MAC LISP of Align Text to Curve and then I'm done. Done with ONE! Is there a way to expedite this without creating a surface? As always, any and all comments/questions are always appreciated. Regards, Miller
  19. AutoCAD 2012. Simple nothing else. This has happened to me once before and my manager and I figured it out by accident over a year ago/work around. We don't remember why it happened so here's hopping someone else knows this issue. Basically I have a drawing where I XREF a drawing model in as "Attachment or Overlay" and place it anywhere and some of the XREF'd modeled objects stays at 0,0,0 while the rest is where ever I placed it... If I use the move command like I want to. The objects in the XREF still moves like normal but those objects at the 0,0,0 origin stay. -In the original model I'm XREF'ing in... I deleted a part and put a new part in and saved it.... It still stuck at 0,0,0 -I tried removing and purging but to no help. -XCLIP off don't work. -Saving with the same 2007 AutoCAD formats don't help. -Character Length of file path isn't an issue. -I XREF'd other models in and they are fine.
  20. lulumara

    X Bind

    Hi to all, I doing an xref to host drawings, tried to Xbind the xref but the problem said not found -- st_segment_lbl this is about Hydro which our company doing a removal of all Electrical post and underground placement of ducts. Our program use is AutoCad 2017. I follow all procedure but the Program kept looking for said about missing files? Any thoughts is appreciated Thanks.
  21. Hi, I have my xref-drawings with many layouts with even more viewports. In all these viewports i wanna show different kind of information and therefore i have to freeze some of the them, depending of what i want to show ofc. Now i just realized i have to change all my layer names from the orginal drawing, and when i do that all the freezed layers unfreezes in my xref viewports. for ex. All my layers starting with B_..... and now i wanna change that to X_... but i still wanna keep the layers frozen/unfrozen on the particular viewport in my xref-file. I Hope you guys understand what im trying to say and hopefully someone will save me from this ¤!%"&/ :)
  22. I was emailed a number of dwgs that have Xrefs, but from what I understand, I need access to the original/referenced dwgs? When I open my "External References" pallette, it shows "unreferenced", and "not found" references. The paths are to the customer's server? I think I'm missing the original file, but I'm new to this Xref, so I'm not confident that I'm doing everything right.
  23. Hi I have a model with 3D walls, slabs, stairs ect. (AEC-objects). In that drawing I allso have an x-ref with some walls and solids and surfaces. When making a Vertical Section and enable Live Section, it only cuts through the objects in the main drawing - not the x-ref. How do I make it cut through the objects in the x-ref as well? Please help
  24. Hello Folks! Having problems with the UCS at the moment. I have rotated my drawings with the UCS command and used the plan command to set the drawings in the angle i want to view them in. And then used world to get the co-ordinate system true to its original state. The problem is when i am trying to attach the drawings together, they are in different places. Do you guys have any clues? (Sorry for my bad english) /Per-Anton
  25. yport

    Lingering xref linetypes

    ACAD LT 2012 I have a problem where I somehow got a ton of xref line types in my template drawing. I must have inserted an object from another drawing into it that carried them. I don't have anything xrefed to the drawing. I've tried to delete them, but I get the message that I can't delete anything currently being used or in an xref. I've also tried copying with base point into another drawing. I went as far as copying individual items into a new drawing with the result being that the xref line types come into the other drawing. Any advice will be appreciated. Thanks, Yport
×
×
  • Create New...