AutoCad :: Variable Box Around An Attribute
Jun 29, 2012Is it possible to have a rectangle, around a single attribute, change it's with as the attribute changes in width?
View 1 RepliesIs it possible to have a rectangle, around a single attribute, change it's with as the attribute changes in width?
View 1 RepliesI would like to create a lisp that does the following:
Update a titleblock attribute with a $variable.
The titleblockname is variable / not static.
The attribute is not variable / Static, DW_SCALE
The titleblock is always places on the same layer, BL$4----
The (custom)-plotscale is stored in the $var "gvpsc".
I've tried to ajust the following lisp code. But I couldn't extract the part I need.
The problem is, the code checks all the layouts and updates all the titlblocks one by one.
Truely a good code.
The only problem is, I don't have multiple layouts and I have a variable titleblock name.
Here is to code i've tried to convert to something I could use.
(defun C:UPD-DPC () (setvar "cmdecho" 0) (setq blkname "DPC-STEMPEL");(getstring "
Enter the name of block to update: ")) (setq att1 "DW_DATE");(strcase(getstring "
Enter the name of the attribute to change: "))) (setq newatt (strcase(getstring "
[Code] ....
I have to obtain a selection set of blocks (by window selection and/or single-picks if the user desires) and then an attribute value which I have previously assigned to a variable called TAGVAL to the attribute tag name called PART in that selection set of blocks.
I found a cool routine called RepAtt, but it isn't quite set up to do what I need...
(defun RepAtt (Tag / SourceBlk ValueToCopy SelSet) (vl-load-com) (if (setq SourceBlk (car (entsel "
Select Source Block:"))) (progn (mapcar '(lambda (p) (if (equal (vla-get-tagstring p) Tag) (setq ValueToCopy (vla-get-textstring p)) ) ) (vlax-invoke (vlax-ename->vla-object SourceBlk) 'GetAttributes ) ) (ssget ":L" '((0 . "INSERT") (66 . 1))) (vlax-for DesBlock (setq SelSet (vla-get-activeselectionset (vla-get-activedocument (vlax-get-acad-object)) ) ) (foreach att (vlax-invoke DesBlock 'GetAttributes) (if (equal (vla-get-tagstring att) Tag) (vla-put-textstring att ValueToCopy) ) ) ) (vla-delete SelSet) ) ) ) (RepAtt "WIDGET");<-- Tag Name
I'm attempting to write a batch script to add some layers to a pre-existing image and save a copy. I've gone through the tutorial, and have run the demo code from Basic_Batch with no errors, but my (what I think of as simple) script throws an "Error: eval: unbound variable: ?" It also seems to cascade the error to other scripts, as I then get "unmatched parentheses: 2" errors from what I assume to be the script immediately following my own during Script-Fu load. This occurs whether running from batch or clicking "Refresh Scripts" from the Script-Fu menu.
What I could find on this forum and Google suggests that I may be required to 'define' one or more of my variables before using it, but for the life of me, I can't figure out which one that would be, and the error (reporting that '?' is undefined!?) I've quintuply (probably more ~_^) checked my parenthesis matching, but they look fine to me.
In case this was an encoding issue, I've tried saving my .scm file as both UTF-8 and ANSI. I should also note that I'm running Windows 7 x64 in English-US.
Script:
(define (script-fu-build-imagebasefilemytext)(let*((image (car (gimp-file-load RUN-NONINTERACTIVE basefile basefile)))(drawable (car (gimp-image-get-active-layer image)))(title (car (gimp-text-layer-new image mytext "Courier" 18 UNIT-POINT))))(gimp-image-add-layer image title -1)(gimp-image-clean-all image)(gimp-file-save RUN-NONINTERACTIVE image drawable "K:\\Images\\Temp.gif" "Temp.gif")));
Since I intend for this script to only be run from batch, I haven't bothered including the typical register stuff.
I've got hundreds of files to convert.
In VBA, how can I batch convert field attributes in blocks to text attributes while retaining the blocks? Is there a simple way to univerally convert them all at onceusing VBA? The plotted values for the fields must be retained, too.
Explode will not retain the value of the field.
Burst will not work as it explodes the blocks as well.
You can right-click on the field and slelct "Convert to text" from the RCM. So I know that the process exists within CAD, just need to batch the process for a quantity of DWGs at a time - in VBA.
I wanna transfer my attribute block values to another attribute text blocks , is there any lisp for that?
Is there a possibility for sum tag values of choice attribute blocks to inside of another attribute text block ?
Background: Someone exploded an attribute block and copied it hundreds of times throughout a project, each time changing the Attribute Tag to match the Value they expected to appear in their drawing. The drawing must be xrefed, so the attribute definitions do not appear.
(There is only 1 attribute in the block.)
Proposed Solutions:
1:AutoLISP routine which copies Tag data from Attribute Definition into Value of Attribute Block:
Prompt-Select Attribute Definition
Copy Tag data
Prompt-Select Attribute Block
Paste data into Value
(Allow repeat to speed workflow)(*PREFERRED*)
2:AutoLISP routine which copies Tag data from Attribute Definition into Default Value and creates a new Block:
Prompt-Select Attribute Definition
Copy Tag data
Paste data into Default Value
Create New Block
(Select Multiple Objects)(Creates tons of new blocks which are messy)
I am using M Text Attributes to store imperial lengths in the drawing, feet inches and fractions (stacked). When I read back the Text String property which, is the M text Attribute.Contents parsed, I am having problems because the parser does not add a space between the inch and the fraction. So, is there any setting that could be used to tell the parser to add the space between the inch and the fraction?
View 1 Replies View Relatedcreating a block with attributes. I did manage to get my block set up and inserted in a dwg, but I am unable to change the "value" of any attribute. Unless I click on the "..." button next to the value field.
View 1 Replies View RelatedWhat I really want to do is on our fire alarm blocks we have 3 different attributes one for the address, the candela and one for misc info. I want to make an attribute that takes the number from the candela (15,30,75or 110) and change a different attribute to a value depending on which candela we use (such as 15=.078, 30=.113, 75=.195 or 110=.259). But I don't want the .078,.113,.195,.259 to print out on paper, I want to export block information excel file so I can add up all values.
View 2 Replies View RelatedI want to copy attribute values. I'm making a catalogue of all the reinforcements in my drawing so I need to name those reinforcements. So what I want is to make a string of text that I don't need to totally modify everytime. Something like this:
Amount of reinforcement bars - 5
Diameter of the reinforcement - 12
Division of reinforcing bars - 100
Reinforcement bars: 5-T12-k100
So the only attributes I'd edit would be the first three not the last one. So how can this be accomplished?
select all blocks on certain layers in a drawing, check attribute CIRCUIT in each block if it starts with MS then attribute CONTROL = switched. I hope thats clear enough the way
(defun c:control()
(graphscr)
(Setq sc (ssget "X" '((0 . "INSERT")
[Code].....
Im Currently working on c# automation.Since im using autocad interop im not able to understand the process of setting
variable in autocad..I have drawing files with different dimension styles used inside..I can filter the dimension by selection set . But the problem is im filtering through dimstyle name.Is there any dxf code for selecting all kind of dimension styles.So that it will be useful for me.
But my problem is i need to apply one particular standard dimstyle to all my drawings. How i could set variable to my new dimstyle(new). This is my code for setting variable ,but its not updating in my current document.
this is my code;
double a = Convert.ToDouble((acadDocument.GetVariable("DIMASZ")));
object b = Convert.ToDouble(2.5);
acadDocument.SetVariable(
"DIMASZ", b);
I'm using annotative scales. But for example line type scale will also change when I change annotative scale. How can I turn that off.
View 9 Replies View RelatedI've got an intermitent problem with copyclip, pasteclip and Wblocks. The functions work in some files but not other it seems to be dependent on the size of the file, i have 7 xref's in the dwg. i can copyclip to the dwg, but not form dwg. is it due to the size of dwg or what? can it be fixed? OR is there a system variable to set?
View 5 Replies View Relatedhow to change the ANNOAUTOSCALE variable?
I've tried using a SendStringToExecute but this doesn't work in the Sub Initialize .
Application.SetSystemVariable("ANNOAUTOSCALE", 4) doesn't work either as I guess it's more of a drawing specific variable.
Some how the variable for saving the dwg file has changed. So, when I save a dwg, I get the prompt for me to type in the file name. What the setting is to change it back?
View 9 Replies View RelatedHow we can backup and restore variable sys cad?
View 8 Replies View Relatedis there a variable for infill to lines given a global thickness? a bit like what TEXTFILL does for text? see pic - the bottom two are copies of the top with thickness applied. normally they'd be shown solid.
View 4 Replies View Relatedknow of a variable which controls how stretching with grips works. I've got a single machine with Autodesk Architecture 2012 that when I select a grip and move it, then type a dimension in the command line, that the line becomes the dimension I typed, not the amount I moved it. For example, If i have 10" line, select and end grip, stretch it +3 inches or -3 inches, the line becomes an absolute of 3 inches. On all other machines, the line would either become 13" or 7".
[URL]
The dynamic input is off.
I'm an Inventor 2011 user and I'm writing a Ilogic script to update an assembly. For this I want to use a variable in a name.
For example d1 till d10 will be given the value 25.
Is it possible to define "d" combined with a variable "n" . The script should be something like this:
n=1
for n<11
dn=25
n=n+1
end
I want to load my DLL, launch the function with a command. After i quit and lauch the same command. (The DLL is already in memory).
(using sessionflags.)
It is possible to keep the variable i have used in the the first launch for use in the second launch ?
The main function is for adding block in a collection (the user select block). The programm quit, so the user can open a another dwg and run the main function for adding another block. (i memorize name, handle, name of file etc..)
Another question : it is possible to create a form in autocad but if the only active document is closed, the form is not closed and visible. ?
All there question is for create a best solution for manage my collection of block.
what the variable is that turns off the animated zoom all ?
View 3 Replies View RelatedBeing new to 13LT I'm not sure if they have included a system variable that would allow the origin of a snap inside a command to automatically start at the first selection point. In the old days (ACAD2000) I was able to customize my keypad to function as a protractor with the 5 key being the @ symbol. We did that with an autolisp which rules that out.
View 3 Replies View RelatedIs there a way to use the coil command to make a spiral out of a rectangle where the thickness of the rectangle starts at one value and ends at another? This would be a spiral torsion spring with decreasing thickness approaching the center.
View 5 Replies View RelatedIs it possible to create a wall in AutoCAD Architecture that will change in size along its length. At one end of the concrete wall the wall thickness is 12", at the other end the wall thickness is 24" thick. The wall will grow in size from one length to the other.
View 6 Replies View RelatedI have set may MENUBAR system variable value to 1, But whenever i exit from autocad 2013 this value changes automatically back to 0 and the pulldown menu disappears.
Also i have attached the screenshots of autocad after manually changing menubar varable with pulldown menu vissible and after exiting and starting autocad again to see the screen without pulldown menu and variable changed to 0 again.
I want to have a piece of text added to the drawing notes that uses a field (or similar), to list the coordinate system code assigned to the drawing, i.e. UTM83-12.
Any setvar or something that I can use?
There are load of different coordinate systems to choose from, and I don’t want to have to manually enter it for every drawing.
I am finding with certain types of fonts, mostly on architectural title sheets, that they get substituted to romans font.When I go to the Fontalt Setting Variable though and enter a period for no selection and then regen, all the 'missing" font regenerates and looks fine.
My question is why is the font not appearing properly in the first place? I must have the font if it is appearing properly.I don't want to have to reset the fontalt variable everytime I want to plot a drawing!
Why the multileader on the left is not visible in the viewport while it's exploded twin is? There are no layers frozen in viewport, and I can't see any variables under properties that would affect visibility. It's part of a file from a subcontractor. I don't know how it was authored. I'm using LT 2012.
AutoCAD 2010
AutoCAD LT 2013
Revit Architecture LT 2013
I wonder is it possible to have a daylight (or other function) that can give a different slope for datum and for the top. This would be useful for if you have different rules (e.g. because of geotech) with regard to temporary and permanent batter slopes.
View 7 Replies View Related