Jump to content

Search the Community

Showing results for tags 'dwgprops'.

  • 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 6 results

  1. cmangi86

    Import Excel to DWGPROPS

    I work as an engineer for a solar company. We preform all of our calculations on an excel file, then transfer these values to Autocad to show our calculations for the plan checkers. I use the DWGPROPS command in Autocad to auto populate all the pages in my plans. I tend to do a lot of copy and pasting and to do all this. Is there a way to isolate the excel values I need and import them into my Autocad DWGPROPS?
  2. Hello, I have some title blocks and PO sheets that contain company information like address, phone, etc. However, in my company the CAD for all branches is done in one location, so this information will need to change depending on which branch the project is for. Right now we use DWGPROPS to fill out job specific information such as JobName, Client, SiteAddress, etc. I would like to include the "Branch Name" in here as well (ie. Vancouver, Calgary, etc), with other fields referencing this entry to fill out the office phone, address, fax, etc, so that we don't need to fill in all of that info manually for every new project. However, I can't find any way to use a custom property in a conditional, ie, something like: if CustomDP.Branch=="CALGARY" then [Phone number]="XXX-XXX-XXXX", elseif CustomDP.Branch=="VANCOUVER" then [Phone number]="YYY-YYY-YYYY" It seems that a "formula" field is able to include nested fields, but is unable to handle conditional statements or branching paths. A DIESEL expression may work, but seems to be completely unable to reference custom DWGPROPS. DIESEL seems unable to reference object properties either, so I also can't do an intermediate attribute that is then referenced by a DIESEL expression. Is there any way to get this functionality? If possible I would really prefer to do it with fields or with some other method that stays self-contained within the template drawing, rather than requiring me to run VB code on every CAD machine in the office. Right now my workaround is is to rename the user profile with the branch name, as that is an easily editable acad variable that is accessible by DIESEL. It kind of works but the issue is that the profile name is global, not saved per project, so I often see POs going out with the wrong "Ship To" address when guys forget to change their profile between projects. Thanks,
  3. Hi all, is it possible to read attributes or properties from the _DWGPROPS and list them in a Lisp e.g. as variables? I need the yellow marked attribute (OD2485), which always has a different number. (defun c:dropsforatts () (setq (vla-get-ActiveDocument (vlax-get-acad-object)) (vla-get-SummaryInfo doc) ) (setq i 0) (setq i 5) ) I would then like to insert this variable into a file path in a Lisp. (defun c:tempsave () (getvar "DWGNAME") (getvar "DWGPREFIX") (command "_+saveas" "G" "2018dwg" "2018(LT2018)" ("F:\\\\Clients\\CT2485\\OD2485\\Planning" ;i need the OD2485 as a variabel from the DWGPROPS (strcat (substr (getvar "DWGNAME") 1 8) "_temp") ) ) )
  4. Folks, I know I am doing something critically wrong here but don't know how to fix it. What I need to do is to read an attribute from a specific title block and write its value to DWGPROPS. Following code will read the attribute for me: (defun Display_Tag_Value (blkname TAG_NAME) (vl-load-com) (ssget "x" (list '(0 . "INSERT") (cons 2 blkname) '(66 . 1)) ) (vlax-for item (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)) ) (foreach ATTRIBUTE_NAME (vlax-safearray->list (vlax-variant-value (vla-getattributes item)) ) (if (= TAG_NAME (vla-get-tagstring ATTRIBUTE_NAME)) (setq str (vla-get-TextString ATTRIBUTE_NAME)) ) ) ) (PRINC str) (PRINC) ) So till now I can read "ATTRIBUTE NAME" value of "BLOCKNAME" with this line: (Display_Tag_Value "[color="red"]BLOCKNAME[/color]" "[color="red"]ATTRIBUTE NAME[/color]") Also this code, can push values to drawing properties: (defun dProps (/ dProp) (vl-load-com) (setq acadObject (vlax-get-acad-object)) (setq acadDocument (vla-get-ActiveDocument acadObject)) (setq dProp (vlax-get-Property acadDocument 'SummaryInfo)) (vlax-put-Property dProp 'Title [color="green"]"test title"[/color]) (princ) ) Hence, I was hoping to reach my goal by mixing these two together: (defun dProps (/ dProp) (vl-load-com) (setq acadObject (vlax-get-acad-object)) (setq acadDocument (vla-get-ActiveDocument acadObject)) (setq dProp (vlax-get-Property acadDocument 'SummaryInfo)) (vlax-put-Property dProp 'Title [color="red"](Display_Tag_Value "BLOCKNAME" "ATTRIBUTE NAME")[/color] ) (princ) ) But ... here is the error I get: error: lisp value has no coercion to VARIANT with this type: In brief: how can I pass a returned value of my function to 'vlax-put-Property'? P.S: Read Lee's code here, but had no idea how to use it.
  5. Hi, I hope you can help. I have created buttons which create custom properties in the DWGPROPS. I would now like to add another custom properties which shows the Current Time (not to be updated). Can this be done?
  6. Hi All, who knows whether it is possible to change drawing properties without opening it using ObjectDBX or not? If so how to save the new properties to the drawing file? I greatly appreciate any help.
×
×
  • Create New...