Jump to content

Search the Community

Showing results for tags 'fields'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


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

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 30 results

  1. Hello all, I have posted as a reply on other post to try and find a way to make what seems to be impossible...possible...First and foremost...I KNOW THE EXACT EQUIVALENT OF SQUAT!! about writing, reading, or understanding LISP or the verbiage associated with it. That being said, I would like to know in the most simplistic of terms, how to change the visibility state of a dynamic block using a field that is referenced from an Excel sheet. Here are the steps that I would like to take in order for what I want to accomplish to happen: open excel file input visibility state data for the block in a designated cell save the excel file open the AutoCAD dwg print (and have the block associated with the Excel input displaying the correct visibility state) I have attached a very simple block and excel sheet with this message, in the excel sheet I have copied the block information from the various visibility states using the LIST command in AutoCAD. I am currently using AutoCAD Mechanical 2018, but this block was made in AutoCAD Mechanical 2016. Here is a code that I copied from a very knowledgeable resource on LISP routines, Mr. Lee Mac, which I am sure that most of you have heard of. ;; Set Dynamic Block Visibility State - Lee Mac ;; Sets the Visibility Parameter of a Dynamic Block (if present) to a specific value (if allowed) ;; blk - [vla] VLA Dynamic Block Reference object ;; val - [str] Visibility State Parameter value ;; Returns: [str] New value of Visibility Parameter, else nil (defun LM:SetVisibilityState ( blk val / vis ) (if (and (setq vis (LM:getvisibilityparametername blk)) (member (strcase val) (mapcar 'strcase (LM:getdynpropallowedvalues blk vis))) ) (LM:setdynpropvalue blk vis val) ) ) My problem is the utterly embarrassing lack of knowledge when it comes to LISP code, so I have absolutely NO idea as to how to utilize or implement his program, what variables to change to fit my drawing or how to make it reference the field or Excel sheet. So any help would be greatly appreciated, and please, feel free to assume that you are talking to a complete idiot on the subject of LISP, because you are, and feel free to explain even OVER explain in detail the changes that I need to make in order to make this little bit of happiness work for me. Thank you in advance for all of those that have taken the time to read this, and have input to share. Thank you, Jetxcc
  2. Hello everybody, This is my first post on CADTutor. I've been reading alot here even before I became a member, but it is time for me to join the community with a question since I cannot find the exact answer to mine. Question: Is it possible to sum numbers in Mtext fields created with lisps? AT.LSP OT.LSP I edited them to suit my needs with prefix and suffix and decimal precision (they are in the core the same, originally made by JTB), one is displaying area of selected polyline (AT.lsp) and the other perimeter/length (OT.lsp). I would like to preserve possibility of field updating so when polyline/area is changed I just enter regenall. I copied Mtext fields maually to "oldstyletable" made from lines and mtext, mtext fields. See attached dwg for example. I've seen this thread: http://www.cadtutor.net/forum/showthread.php?43699-Sum-Text-Strings-to-Text-Field... I tried all the lisps but none are applicable to my problem. I get only #### even after regen (I think it's maybe because of prefix and suffix, but don't know). I've managed to work only with text and then my updating Mtext fields are, for sure, gone. Please advise. TEST1.dwg
  3. Hey guys, So, is it possible to have a lisp that automatically labels a block based on an attribute? Ideally, it would also be a field so that if the attribute changed, the mulitleader text would as well. For example, let's say I have a dynamic block for an Oak Tree, which has three sizes: 2", 3", & 4". It'd be great if I could run a LISP that would create a multileader that read " 2"-Oak Tree ". It'd be doubly great if the 2" part of that was a field that updated if the dynamic block was changed to its 4" state. For reference, this wonderful Lee Mac LISP is what I currently use for my labeling and it's brilliant. Ideally, I'll end up combining the attribute/field labeling component with this lisp somehow. Lastly, I'm not great at all with writing LISPs, but I'd like to figure out how this one would work so that I can modify it as need be on my own. Thanks for any help!
  4. Hello, I have created a table within AutoCAD. I have written some words in cell "A1", I would like to display the same words in another cell using an equation "=A1". When I type the "=A1" equation the cell displays "####" Is there anyway to make this work? possibly using fields? Thanks
  5. Hi all, I have been tasked with coming up with a dynamic block that is for a chute. It is a simple rectangle that I've added some attributes to and a field within one of the attributes. What I need the formula to do is calculate the angle of the chute based on user input for the upper height and the lower height (rise) and "Distance 1" (run) and then return the answer in the field. It returns the correct angle on insertion, however, when I change any of the values and Regen the result is incorrect. In addition, I would like the "Angle" attribute to not show in the dialog box when inserted. Is that possible? Thanks. Chute plan view.dwg
  6. Hi All, i'm trying to make a new linetype with text, but i want the text to have a field that displays the length of the line. Does anyone know how to do this? Or if it's possible? Any help would be much appreciated!
  7. Hi! I have a text box containing mText with fields. I have drawn up the multiline box I want to have the text in, problem is that when the fields change the text gets longer and therefor makes the box bigger leading to my text no longer staying within the size its supposed to. Is there a way to fit mtext? Force it to stay within the set border and if more rows than fit are added, shrink the text? Thank you!
  8. The overall goal is to reduce data entry. I have an excel file that has been special pasted into my Autodesk AutoCAD LT. I want to take information from individual cells and make them into fielded values. If you have follow-up questions, I will be happy to answer.
  9. Hi I am trying to get a field to link two texts, so that when the first is edited, the second updates to the same, similar to the =CELL function in excel. I can get this to work when using standard text, however when I try to do this with text that is bold and Arial Narrow, the second text displays lots of additional information. I have attached a screen grab of the field window to show what I mean. How can I avoid this? I am working on AutoCAD LT 2016.
  10. Is there any way to update new field attributes in existing blocks already placed in the drawing? I have tried BATTMAN, REFEDIT, ATTSYNC, FIELDEVAL=31... nothing is working. Or will I have to insert all those blocks again? Cause for now that's the only way I can make it work.
  11. I am trying to create blocks that have a fields, I would like to have it so you can just update the field without actually editing the block. Is this possible? *update* This block is basic notes that need to be shown on different jobs but might have some job specific data that needs to be updates, my thought would be to create a field (or something similar) that someone could just click and add the information they need without opening the editor. But maybe that is just what they will need to do.
  12. i've learned a few different techniques for making an affective title block but i want to weigh in on what you guys think as I have not mastered this yet. Right now i'm drawing my title block linework and permanent text in model space. then I xref that file into paper space of drawing for each layout/sheet. I use fields for the unique text on each page. I copy and paste these fields into each layout/sheet. I don't see too much of an issue here, however its a little time consuming to copy and paste these fields every time i make a new layout/sheet. Is there a simple way to insert my title block xref and insert these fields in one step? I think this is where the dwt file comes into play but i dont know. whats the difference between dwt and dwg? What if i want to shift the position of the sheet number on every page? Can we setup the title block to allow one to shift the sheet number once and apply the change to every page? Thanks for your help in advance!
  13. Hi all. I am trying to improve my efficiency with our drawing time. One way I can speed up the process is to fill out the title block on one layout and for it to appear the same on the other layouts. My problem is getting it to happen, so I hope someone can help me out. I have the title block set up with attributes, and although the Gatte command works it is not quite what I am looking for. I have set up fields, customized drawing properties, and tried to set up sheets in the manager. Either I am missing a step or going about it the wrong way. Can anyone help in pointing me in the right direction? Thank you.
  14. I run Autocad 2010 on Windows XP, eventhough I always had this problem and never could find a solution. I have a problem when I copy a text with a surface field associated to a polyline. I have a drawing in cm but I need the surfaces to be in m², hence I use a conversion factor. I created the field and associated with the polyline. If I copy the field and associate it with a new polyline, I lose the settings of the conversion factor, so that everytime I copy it I have to reset the conversion factor. Is there anyway to keep those settings? Thank you Duccio
  15. Last week I created a dynamic block that contained Text objects (with inserted Fields) that displayed each Text Object's position within the Block. In other words, my Text objects displayed their own X or Y position as relevant. I had re-opened the drawing several times that day and everything worked fine. I opened the file today and all the fields contain ######. DYNAMIC BLOCK USE: Dynamic map grid DESCRIPTION: Combines a Linear Parameter with an Array Action that arrays the grid lines and their position labels. Once the block is setup it is exploded and regenerated - the labels then display their positions within the drawing. FIELD CONTENTS: Each grid label is a field that looks at its own Text Alignment X or Y position. I set this up by copying and pasting a Field Expression into the formula entry area. As you cannot select the Text Object you are currently in, I used dummy text fields to find the Field Expression I needed for the desired Text Object. Does anyone know why my dynamic blocks work fine one day and not the next - this has happened for some of my other dynamic blocks. When you edit the fields the formulas have gone. Any help would be greatly appreciated - thanks in advance.
  16. Hi I'm new to the site so I'll try and be as clear as possible! I am creating a new title block for my office. In the new block I am using fields to limit the amount we have to fill it out. This has worked well with the exception of getting the viewport scale to work properly. I have visited just about every forum on the internet to see how to make this work and all i can discover is that I don't appear to be doing anything wrong. So my question is this. I am using a field in a title block that links to a viewport to give its custom scale value. ie the viewport is set at 1:100 then in the title block says that the scale shown in the drawing is 1:100. If I have to change the scale in the viewport to 1:50 then i can regen my layout and my title block will now say that the scale shown in the drawing is 1:50. Like Magic!! However this is not working for the scales 1:5, 1:25 & 1:200. Instead of the scale the field in the block just says "CUSTOM". Does anyone know why and how i can fix this? It makes no sense to me and works with all the other scales that we use. Thanks in advance
  17. psuengineer84

    Dynamic Block Fields

    I cannot figure out how to get a field to update to a linear parameter within a dynamic block. See attached. There is a regular dimension string on the left and my custom dynamic block on the right. Don't mind that the action parameters do not affect the field, as I will update that when I figure this thing out. Thanks! SMALL_DIM.dwg
  18. Greetings all! I recently wrote a routine that took information from the user via a dialog box and populated our titlemark block. After I got this working I wanted to add some additional functionality by having the user pick the viewport the titlemark would be associated with and by using a field populate the scale in the titlemark instead of having the user type in the input. I have attached my desired result. here is the code I am using, I think my problem area is in red. (defun C:TLMK ( / TLMK_LEN PT1) (setvar "CMDECHO" 0) (setq tempunits (getvar "insunits")) ;======================================================================================================================================== LOADS DIALOG BOX (defun TLMK(/ DCL_ID) (setq DCL_ID (load_dialog "n:/tuterj/AutoLISP/Working/TL-MK_Scale_add.DCL")) (if (not (new_dialog "TLMK" DCL_ID)) (exit)) (setq mark_n nil) (setq title_n nil) (action_tile "cancel" "(done_dialog) (exit)") (action_tile "mark_n" "(setq mark_n $value)") (action_tile "title_n" "(setq title_n $value)") (start_dialog) (unload_dialog DCL_ID) (princ) ) ;defun TLMK (TLMK) ;======================================================================================================================================== End of Dialog BOx [color=red](vl-load-com)[/color] [color=red](setq vpent (car (nentsel "\nselect viewport"))) ;user selects viewport and viewport id is stored under vpent[/color] [color=red](vlax-ename->vla-object vpent) ;vpent is transformed from an entity to a VLA object[/color] [color=red](setq scale_fld (strcat "%<\AcObjProp.16.2 Object(%<\_ObjId "(vl-princ-to-string(vla-get-Objectid vpent))">%).CustomScale \f\"%sn\">%")) ;assigns field expression to variable.[/color] (setq PT1 (getpoint "\nselect insertion point: ")) (setvar "ATTDIA" 0) (setq title_u (strcase title_n)) ;declaring additional variable to change case for title_n (setvar "insunits" 0) ;setting insertion units to unitless for proper scale of inserted block (command "insert" "N:/Tuterj/AutoLISP/Working/TitleMark-field.dwg" PT1 "" "" title_u scale_fld mark_n) ;inserting the contents of TitleMark drawing and inserting user input from dialog box. (setvar "ATTDIA" 1) (setvar "CMDECHO" 1) (setvar "insunits" tempunits) ) ;defun C:TLMK I have also attached the error I am getting when I try to run the routine. I would appriciate any help anyone is willing to provide. Thank you all for your time and for reading.
  19. stenna

    CTAB Field editing

    Evening All I have a scenario where I want to use some thing like the system variable CTAB in a field but have it report another Layout Name in the drawing rather than the Layout that I'm working in. Let me explain..... I'm producing phasing drawings for a well known supermarket and I use the Layout Tab name to drive the phasing dates within the Layout. ie P1 - Thu 23 Oct. I then use this to populate the title block etc with the system variable CTAB this saves me a whole load of time as I know the dates on the Layout tab name are correct and will therefore be right in the drawings (upwards of 25 drawings per project). I've just had a request to add some more information into the drawings but this has the date for the next phase ie P2 - Fri 24 Oct, I cant use the CTAB variable as it will report the wrong date ; Is there a way I can report another Layout Tab name with a system variable or through Diesel? Hope that makes sense! Stenna
  20. Hi guys, is there any command that performs the selection of objects associated with an object field? I'm using an excellent routine performed by Lee Mac to make the sum of texts. At the end of addition, it generates a field. In some moments I need to check the path where I spent. It would be very interesting if we could make a quick selection using the ID of the objects contained in the field. I should point out that I still have no experience with the Lisp language. Thank in advance. Luis Augusto. Currently with autocad 2010 Translated by google
  21. In looking for a lisp routine that performs the sum selected dimensions, found one that I believe to be ideal for my work. Could the author or another member of the forum to make a change? It would be ideal for me to make the sum property>%). TextOverride>% Rotated Dimension object. I tried to make the change but as I am not aware that language still did not succeed. Returns the error "misplaced dot on input". Below the original routine. Dims2Field.lsp (defun c:Dims2Field ( / *error* spc doc pt uFlag ss ids ) (vl-load-com) ;; © Lee Mac 2010 (defun *error* ( msg ) (and uFlag (vla-EndUndomark doc)) (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **"))) (princ) ) (setq spc (if (or (eq AcModelSpace (vla-get-ActiveSpace (setq doc (vla-get-ActiveDocument (vlax-get-acad-object) ) ) ) ) (eq :vlax-true (vla-get-MSpace doc)) ) (vla-get-ModelSpace doc) (vla-get-PaperSpace doc) ) ) (if (and (ssget '((0 . "*DIMENSION"))) (setq pt (getpoint "\nPick Point for Field: "))) (progn (setq uFlag (not (vla-StartUndoMark doc))) (vlax-for obj (setq ss (vla-get-ActiveSelectionSet doc)) (setq Ids (cons (GetObjectID obj doc) Ids) ) ) (vla-delete ss) (vla-AddMText spc (vlax-3D-point pt) 0. (if (= 1 (length Ids)) (strcat "%<\\AcObjProp Object(%<\\_ObjId " (car Ids) ">%).Measurement \\f \"%lu6\">%") (strcat "%<\\AcExpr" (lst->str Ids " %<\\AcObjProp Object(%<\\_ObjId " ">%).Measurement >% +") ">%).Measurement >% \\f \"%lu6\">%" ) ) ) (setq uFlag (vla-EndUndomark doc)) ) ) (princ) ) (defun lst->str ( lst d1 d2 ) ;; © Lee Mac 2010 (if (cdr lst) (strcat d1 (car lst) d2 (lst->str (cdr lst) d1 d2)) (strcat d1 (car lst)) ) ) (defun GetObjectID ( obj doc ) ;; © Lee Mac 2010 (if (eq "X64" (strcase (getenv "PROCESSOR_ARCHITECTURE") ) ) (vlax-invoke-method (vla-get-Utility doc) 'GetObjectIdString obj :vlax-false ) (itoa (vla-get-Objectid obj)) ) ) Thank in advanced. Luis Augusto.
  22. Hi, CAD noob here. I use AutoCAD MEP 2013 and am trying to get some sort of text field that is linked to other text fields for our title block at my work. So, when we type in the project number, the project number updates across all paper space tabs. Same for Drawn By initials, Checked By, etc. Can anyone help with this? I have been looking into text fields but when I put one in and try to edit it (double click, select) it just deletes the field when I try to type into it. I guess I just don't know how to use text fields and have never been trained. Would greatly appreciate the help, I have spent hours on this with no success. Thank you
  23. How can I add leading Zeros to the CurrentSheetNumber Field? I know that the code for this field is: %% . How can I modify this code so that the CurrentSheetNumber is displayed in the form 0001 instead of just 1? Thank you.
  24. Is there any way to pull text from a spreadsheet into arc-aligned text? Like if I were trying to make round inspection tags but didn't want to type in the inspection code each time, or if I needed to change something? Is it possible to put a field into the text to refer to a cell location in Excel? About me: I just started using AutoCAD 2011 (I was previously using AutoCAD 2005) and am having a hard time finding my old controls while learning all the new features for which I got the program. Please use small words.
  25. Hi, Recently I've gotten into this type of problem. Have an ATT "A" that is set. I can change it and it will change. But I also have an ATT "B" which works the same way as the "A". I've added a MTXT into the block so that both ATT's A and B will work together, meaning they will always be in a dead center - something like text (no matter what the string is, you can Align it Middle Center), using a FIELDS option, and parameter set to VALUE. It works when placed into the drawing, but need something that once I place the block and want to edit the VALUE, the Fields will update/sync. I'm asking for some guidance from you guys. Thank you in advance for the help. Vee A and B.dwg
  • Create New...