Search the Community
Showing results for tags 'custom properties'.
Found 7 results
Update Field with Conditional Statement Referencing DWGPROPS
Kyler posted a topic in AutoCAD Drawing Management & OutputHello, 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,
Title block detail filling Macro
Prasanna posted a topic in AutoLISP, Visual LISP & DCLHi, I'm new to AutoCAD. I have 700 drawings in AutoCAD. I have to enter "Checker" value in the drawing title block. For all the drawings, its the same value. How to I automate this? I don't want to open manually individual drawing and fill the value. Any macro available for this? Please help. Regards, Prasanna.A
Quickly editing custom drawing properties
Kyler posted a topic in AutoLISP, Visual LISP & DCLHey guys, I use the custom tab in the DWG properties in all of my drawings to auto-fill fields on title blocks and some other things. There are about 17 custom values that are entered every time and I cannot figure out if there is a good way to quickly edit these without meticulously clicking on each one individually with the mouse. Pressing [TAB] just cycles through the "Add", "Delete", "OK", etc buttons. The arrow keys let you move the blue selection up and down, but I can't see any way to actually edit what is selected. Typing just selects the Named value that matches your input. Not a big deal if it is impossible but it would be nice to save a bit of time here going back and forth between the mouse and keyboard. Thanks,
Dynamic blocks - Attributes to custom properties and viceversa
Gotrekk posted a topic in AutoLISP, Visual LISP & DCLHi there, I have many different blocks with different attributes and custom properties (rotation angle, position 1 X, position 1 Y, and so on). All of them have a perfect correspondence between attributes names and custom properties names. For example, if i have a block with custom properties "rotation_head" and "position_head" i will have two attributes called "rotation_head" and "position_head". I'd need a lisp with two functions cycling through all the selected different blocks; one of the function would: - for each selected block, read the attributes and set the custom properties while the other would: - for each selected block, read the custom properties and set the attributes. Do you think something like this would be possible? The reason behind this kind of request is because i need to import and export shapefiles to autocad map and i need to set blocks custom properties using shapefiles table.a Thanks in advance for any ideas/tips Regards GTK
Custom Properties Error Help
chiimayred posted a topic in AutoLISP, Visual LISP & DCLHey guys, I'm working on a piece of code where I need the lisp to look up a custom property that's set and extract it. The problem I am having is that we updated our templates within the last two years so this piece of code doesn't work properly with some of the older drawings we have. I want it to assign the variable a value if it can't find it, but I don't know how to get around the automation error. Here's my attempt but I am at a loss as to what to do. (defun c:test (/ acadobject acaddocument dprops pp pp#) (setq acadObject (vlax-get-Acad-Object)) (setq acadDocument (vla-get-Activedocument acadObject)) (setq dProps (vlax-get-property acadDocument 'Summaryinfo)) (vla-getcustombyindex dprops 72 'PP 'PP#) (if (= PP# nil) (setq PP# "PLXX-X-XX-") );;end if );;end defun Here's the error I get. Error: Automation Error. Out of range FYI: The name of the custom property is Plot Plan Thanks in advance!
how can i import data from xml file to autocad custom properties?
ChirilaDan posted a topic in AutoLISP, Visual LISP & DCLI need some lisp or vba app so that i can fill in autocad custom properties values from an xml file. I am setting up a dwt file to use fields based on that custom properties. Thanks
Sheet Set Field Management
SpeakNoEvil posted a topic in AutoCAD Drawing Management & OutputHello! I'm trying to find an intelligent way to reorganize the custom properties in my sheet set. Some are poorly named, others I suspect aren't even used. As far as I can tell, you can't rename a custom property; you have to create a new one, transfer the definitions throughout the sheet set one by one, and then delete the original. Isn't there a better way? P.S. I'm referring specifically to the sheet set custom properties, found by right-clicking the sheet set in SSM and going to properties. They're closely related to fields.