AutoCAD VB :: First Time Automatisation (changing Text)
Jan 7, 2013
I'm trying to automate something that takes a lot of time at my company.We got a lot of P&ID drawings full of tags. I want to automate the modification of tags according to an excel table.
I got something working but it's not reliable. It often doesn't work and it's very slow. I'm no programmer besides some programming classes back in school.It's function is to let the user pick which P&ID's should be put in the modification loop.It's just a listbox (filenames), a textbox (for the file location) and a button.
Private Sub CommandButton1_Click()Dim vtPid As VariantReDim vtPid(0)Dim i As Integer, j As Integer j = 0 For i = 0 To lstPid.ListCount - 1 If lstPid.Selected(i) = True Then ReDim Preserve vtPid(j) vtPid(j) = lstPid.List(i) j = j + 1 End If NextfrmPidTag.HideCall Modifie_PIDTag(vtPid, txtLocation.Text)End Sub
The code is in my module.First I open the excel (table with 2 columns, old and new tag) and put the table in an array.The array is then used cycle through al entities.
[b] I'm trying to change certain text located in the layer "instrumentation".[/b] It's just text strings, no blocks or anything.
I'd like to use another method to get only the entities with possible matches but this seems to be the only reliable method. Only cycling textstrings would be better.
Sub Modifie_PIDTag(ByVal vtPid As Variant, ByVal varLocation As String)' Create the Excel objectDim oExcel As Excel.ApplicationDim oBook As Excel.WorkbookDim oSheet As Excel.WorksheetDim aryPID()Dim LastRow As IntegerDim LastColumn As Integer' Open existing workbookSet oExcel = CreateObject("Excel.Application")Set oBook = oExcel.Workbooks.Open(varLocation & "EXCELDrawingData.xlsx")'Set oExcel = New Excel.ApplicationoExcel.Visible = False ' Open worksheetSet oSheet = oBook.Worksheets("PIDtag")oSheet.Activate' Read ExcelLastColumn = oSheet.Cells(1, oSheet.Columns.count).End(xlToLeft).ColumnLastRow = oSheet.Cells(oSheet.Rows.count, 1).End(xlUp).RowReDim aryPID(1 To LastRow, 1.
[code]....
The get/create autocad object may seem out of place there but it was the only way to solve an error.Calling the subroutine from a form gave me automation errors.
View 7 Replies
ADVERTISEMENT
Jan 20, 2012
In Autocad there are these parameters you can set, like HPDRAWORDER, HPNAME,..etc. Every time I open my autocad (2012), these values are set to default again. How do I manage to keep these variables registered so i don't need to change them every time I start up?
View 3 Replies
View Related
Apr 30, 2012
I only do programming when absolutely needed so it usually only happens every couple years. I wrote this routine to count nested blocks inside of dynamic blocks to count parking spaces. The routine worked fine but was relying on the ltscale to scale a block containing an attribute for the total number of spaces. I want to update the routine to use an annotative block so the scale doesn't have to be set. I changed my block containing the attribute but now when I run my routine, the attribute height gets changed each time the routine is run. The text just gets larger and larger. Here is the portion of the routine where the attribute info is gathered and updated with the new value for that attribute. If you need the entire routine, I can post it with a slight modification so it will work outside our network.
(defun updateattrib ()
(setq CNT 0) ; sets count to 0
(while (< CNT (sslength ss)) ; starts loop while CNT is less than the number of objects in the group
[Code].....
I am running this in Civil 3D 2010 but will want it to work in 2013 so if the solution will only work in 2013, that is fine with me.
View 3 Replies
View Related
Apr 19, 2014
i need to change time of a clip that strat at 00:00:00:00 to 01:00:00:00 how can i do it?
View 2 Replies
View Related
Mar 15, 2013
I recently had to reload PSE9 on my Vista 64-bit machine after a motherboard/hard drive failure (yes, supposedly both components failed). I edited a few images tonight and noticed that the time-stamp metadata on the imported images does not match the metadata on the originals--everything is an hour off. I made the original purchase of the product a few years ago and it was fixed by a later update. If it matters, the images are RAW format images and I was using the full edit functions of the software.
View 1 Replies
View Related
Feb 27, 2012
The problem I have is that my cameras internal clock drifted out and I need to adjust the capture time of a number of images by an odd amount i.e not an integer number of hours.
That is alter the capture time on multiple images by an amount such as -1h 25m 35s and they are RAW image files.
View 2 Replies
View Related
Feb 9, 2014
For some reason the time ruler is displaying frames and not seconds. I have tried cycling through the various time modes by ctrl clicking it as well as modifyign it in file->project settings, yet seconds will not show up on the time ruler. Please view the image below. I have also tried resetting the work space to standard default with no result.
View 4 Replies
View Related
Aug 7, 2012
How do i move a keyframe in time without changing any of its x,y,z parameters?
and Can i have different interpolations for individual keyframes on the same parameter? (so i can ramp a move into a keyframe, then continue out at a linear interpolation)?
View 6 Replies
View Related
Apr 1, 2011
I have a patern, I need to move, I know in advanced I can more it with Origin, but I have to close and open the window.
CorelDraw X5 v. 15.2.0.686 Hot Fix 4 - Windows 7-64
View 1 Replies
View Related
Aug 4, 2013
I have inside every text,Mtext contents different text style like Arial_1 , Arial_2.
How i can give all the contents inside one style ? the normal procedure i will enter inside text to enter editing mode and changing text format style one by one. I want it once.
I want to save my routing of entering every text to change its content text style.
(Notice:select all from outside without editing mode will not do the job)
View 2 Replies
View Related
Sep 13, 2013
I am having problems with changing the height of the dimension text. I have tried going into the style editor and changing the text height in there and then saving it. The number for the height that I changed stays saved however the actual text height on the drawing does not, not even after I tell it to update.
View 3 Replies
View Related
Sep 7, 2006
I have an image, I just need to changethe text in that image without changing anything else.
View 5 Replies
View Related
Jan 31, 2002
I need to change a text item in about 200 drawings. I would rather do this at one time if at all possible.
View 4 Replies
View Related
Jul 31, 2008
Ive got a problem with a drawing from a client and the text is in multi-line format and is currently at the correct angle, however, when I go to edit the text is rotate's it's self round 270 deg....
View 9 Replies
View Related
Oct 7, 2013
I would like to find a way to edit multiple text boxes in inventor instead of one at a time.
For example, in autocad, when multiple text boxes are selected, any values that are different in the properties window are represented as "varies".
Is there a way to select multiple text boxes and do things such as change the text height, justification, font, etc, just as it works in autocad?
View 1 Replies
View Related
Jul 21, 2012
I want to change a lot of table cell text in one time, try to explain something.
In the front of my drawings i have a view tables. in the second column stays a code that represent a location.
e.g. LVC stays for Low voltage cubicle. Now it is my intention to substitute these code to the description of code in one time and only the second column. The several descriptions are written in an .txt file, like LVC;Low voltage cubicle and on the next row LVP;Low voltage panel, and so on.
I think it is only possible with Lisp? or there are other way?
In the past i did it one by one, because mostly there where 2 or 3 tables, now i have a big project with more than 20 tables.
View 9 Replies
View Related
Jun 4, 2012
In the last 2 days Corel has decided to start changing Artistic Text to Paragraph Text when I copy & paste it across documents, completely changing the font, size & colour of what I am copying.
I've just done a factory reset & it's still doing it.
I don't recall doing anything that would change a setting.
The text I am copy & pasting are disclaimers that are all set on 1 document & I copy & paste them to a proof as needed.
View 4 Replies
View Related
Feb 13, 2012
I used to have a lisp routine for selecting multiple strings of single line text and converting them to a single multiline text box. I think there was even an express tool in previous versions of CAD to do this. I am in 2011 now, and I can not find a command for this. I would even settle for simply changing single line to multiline without adding multiple strings.
View 8 Replies
View Related
Oct 22, 2011
Run TIME command and then take the resulting text and save it to a file.
Ideally, the text file should be named based on the drawing name. I know there's ways to write text to a file but I haven't had any luck taking the output of a command and exporting it.
View 9 Replies
View Related
Sep 28, 2013
I am having trouble in changing the color of the bullets without changing the text color. Problem is I cannot select/highlight just the bullet so any new color selected applies to the whole line including bullet and text. I am using DP v 7.
View 8 Replies
View Related
Jan 16, 2012
Ok some times when I go to run details it pops up that it can not load the component database AecDtlComponents (US).mdb file. I go to options and can not do anything there. So I have to close it all down and hope when I reload AA it works. 9 out of 10 times it does. But this is a pain to do when ever you need to add detail stuff. Oh also this happens on more then one computer in the office. running 2012 with sp and all updates on windows 7
View 8 Replies
View Related
Jun 28, 2012
This has happened in a couple of drawings now. The STYLE dialog keeps saying "The current style has been modified. Do you want to save your changes?" even when I have changed nothing at all. Anyway, I select the style I want, hit Apply and Set Current, and put in some text. Now I list that text, and sure enough, instead of being on L80 it says L-BASE|Standard or some such thing. If I use DTEXT, Style and set it there, my text will be the correct style - but if I go back to the Style dialog box, L-BASE|Standard will show as current again. Acad C3D 2011.
View 3 Replies
View Related
Jun 8, 2012
I need to change the style of my single text, not Mtext, but just text on AutoCAD 2011. If I try to edit Mtext then the Ribbon on the top of Cad changes to Text Editor and allows me to modify the text as I require. However when I click into single text all that happens is the text becomes highlight and I no longer get the option to change the style or font. What toolbar or option is missing so I can get it back as normal.
View 9 Replies
View Related
Jul 4, 2013
I have a title block saved in my template file, and also as a block in the design centre. The variable fields within the title block are in Arial font. If I open each title block and fill them in I have no problem. If I take the shortcut of filling in one and copy and paste from one sheet into the next sheet, the text properties change back to standard.
View 2 Replies
View Related
Jan 26, 2014
I've just finished a large survey using GPS, this I've downloaded onto autocad. My issue is I've got loads of levels on cad drawing that I wish to make larger. These where downloaded automatically, onto drawing. Is there a way to change height of text, so all heights are larger, or do I hand change them one by one!
View 6 Replies
View Related
Aug 30, 2013
I've got a problem with some of my text's in Autocad. From the screenshot you can see some different texts, theese are copied by their content and pasted manually.
Now, ive got to change the content of theese, and i dont want to do that 1 by 1. Is there a way i could edit for ex. all my YV-E-------------1H at the same time?
View 9 Replies
View Related
Mar 4, 2012
changing text style in a drawing. Let's say there is a drawing where the font style is standard, or the standard is overwritten in the text box (different size or font). I want to create a new text style which uses a new text size and font.
If i select the text which was created earlier and switch text style to the one i just created only the size of the text changes not, and the font remains the same.
But if i enter the text formatting box select the text and in style i select the one i created (even though is already selected) the font will change as well. The problem with this solution is the time needed to change every text in a large drawing.
If i use MATCHPROP the same thing, the size of the text will change but not the font.
Is there a way to change both the size and font of the text fast and easy?
View 2 Replies
View Related
Jun 12, 2013
Im working for a geological firm that use timescales to describe their work (depths at times etc). I need to compress the time bar but not alter the text but cant find way to do it. Im only scaling in 1 direction.
View 4 Replies
View Related
Sep 6, 2013
I just realized that I have quite a number of text instances (261!) that require that I change the color of the text. All of these instances are associated with multileaders and but are only a portion of the text associated with each multileader.
View 6 Replies
View Related
Sep 14, 2013
I want to change the text in my dimension. I don't actually want to change my the actual dimension, just the text. Is it possible? I want to create drawings that aren't to scale, and put in the dimensions that I want on there.
View 1 Replies
View Related
Sep 27, 2012
At the moment, I'm labeling features on my drawing with stations/offsets, but this question really applies to all label settings - is there any way to restrict the label text to be in all caps? I know I can just type in the station/offset labels manually but I'd like to be able to use the automatic-updating functionality of AutoCAD 3D.
View 2 Replies
View Related