Jump to content

Search the Community

Showing results for tags 'field code'.

  • 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...

Found 3 results

  1. Hey Guys, I have created a bunch of lisp variables that look something like this "StageArea1", "StageArea2", ect What im wanting to do is create a field formula that links to these variable, but i want whatever area value it calls to be determined by the contents of a piece of text. My initial thoughts where something like this(or some variation of it): %<\AcVar.17.0 Lisp.StageArea(%<\AcObjProp Object(%<\_ObjId 2228256557344>%).TextString>%)>% With %<\AcObjProp Object(%<\_ObjId 2228256557344>%).TextString>% calling the contents of my piece of text, but this doesn't seem to work when i plug it into a Formula inside the field dialog box. Does anyone have any other ideas on how to do this?
  2. I made below lisp code to have field code copied to text,dim etc. but not work on ATT thing anyone could help me with this how to make it happen that copy field code to ATT? :) (defun c:ffd () (progn (setvar "cmdecho" 0) (setvar "blipmode" 0) (vl-load-com) (progn (setq ent (entsel "select text to be copied:")) (setq egg (cdr (assoc 0 (entget (car ent))))) (setq entx (vlax-ename->vla-object (car ent))) (cond ((= egg "INSERT") (setq entp (entget (car (nentselp (cadr ent))))) (setq entr (cdr (assoc -1 entp))) (setq objid (vla-get-objectid (vlax-ename->vla-object entr))) (setq field (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa objid) ">%).TextString>%")) ; %<\AcObjProp Object(%<\_ObjId 8796059764128>%).TextString>% ; %<\AcObjProp Object(%<\_ObjId 8796083319744>%).TextString>% ) ((= egg "DIMENSION") (setq objid (vla-get-objectid entx)) (setq field (strcat "%<\\AcObjProp Object(%<\\_ObjId " (itoa objid) ">%).Measurement \\f \"%lu2\">%")) ) ) ;%<\AcObjProp Object(%<\_ObjId 8796059773904>%).Measurement \f "%lu2">% (setq ent1 (entsel "copy to:")) (setq egg1 (cdr (assoc 0 (entget (car ent1))))) (setq entx1 (vlax-ename->vla-object (car ent1))) (cond ((= egg1 "INSERT") (setq entp (entget (car (nentselp (cadr ent1))))) (setq entr (cdr (assoc -1 entp))) (vla-put-TextString (vlax-ename->vla-object entr) field) ) ((OR (= egg1 "TEXT") (= egg1 "MTEXT")) (vla-put-textstring entx1 field) ) ((= egg1 "DIMENSION") (vla-put-TextOverride entx1 field) ) ) ) ) )
  3. I am having trouble finding a reference for how to use field code. I am trying to create a custom fied in MTEXT that will only display the 1st 25 characters of a filename. I can't find any good resources to explain how field code in AutoCAD works on the web or in the AutoCAD help.
×
×
  • Create New...