AutoCAD .NET :: Database Parameter In Batch Process - By Reference?
Nov 21, 2012
I have a master batch process which comprises several steps each of which will change the database. I am gettting the database once, then pass it thought the subsequent steps. Simple example in pseudo
void BatchAll(){
database db = new database
BindXref(db)
PurgeAll(db)
DoSomethingElse(db)
save dwg
}finish BatchAll
Should the database db be passed by reference (ref db)?
I inserted a block from a dwg drawing with the following method: Â public static ObjectId InsertBlock(string fileName, Point3d insPoint) { var acadDoc = Application.DocumentManager.MdiActiveDocument; var blockId = default(ObjectId); using (var acadLockDoc = acadDoc.LockDocument()) { var dbTemp = new Database(false, true); dbTemp.ReadDwgFile(fileName, FileShare.Read, false, ""); var blockName = Path.GetFileNameWithoutExtension(fileName); [code]........
Does the source file size impact the functionality of a surface data reference?
Case 1 I have a source dwg that has a single surface, Surface A, in it and is an overall small file size. Case 2 I have a source dwg that has Surface A as well as another 10 surface and the file size is HUGE.
When I data reference out Surface A from Case 1 versus Case 2 does the new drawing look back at the entire drawing or just the surface data to make sure the surface is up-to-date when syncing?
I wish I perform the following code with iLogic. Is it possible to change a model parameter to a reference parameter? Â If My_Expression Then' My dimension "d0" is a Driven Dimension' or' My dimension "d0" is a Reference ParameterElse' My dimension "d0" is NOT a Driven Dimension' or' My dimension "d0" is a Model ParameterEnd If
My office currently has a unique keynote database for each project. When I open a file with a sheet keynote legend, AutoCAD 2010 opens up the correct database and everything is fine. This is also true when I try to plot a sheet file. However, when I plot through the batch-plot process, AutoCAD does not open the correct database.
I created view representations in my assembly, for example a column with k-polates and base plates, the column is a FG part, so now i create drawings and place views on that drawing, what i am askign for is I want to place the name of the view representation in my view label as a paramater so in the event i change my view names in my model they update in my drawing, this is important because i can create a cross referance to my 3D DWXF file views.
I need to assign the dimension in my screenshot to a parameter so I can use it to drive another assembly. However, I can't find any way to capture it in a usable manner.
In the screenshot I have an associative part inserted that contains only a sketch with the projected line and point that I wish to measure between, but the geometry in the sketch does not update when the model geometry changes. This seems to be normal behavior?
I want to reference parameters in an iRule in such a way that the value of parameter A determines the value of parameter b.
In this case i want to reference the dimensional height of a UC beam into a parameter <UC_HEIGHT> and then allow this to determine the value of uc designation size in a parameter <UC_DESIGNATION>
This would be useful because instead of typing the uc designation of a beam into the part description or matl. list i can just reference a parameter.
Is this possible? Iv tried an iRule along the lines of
if parameter (uc height) = xxx.x then parameter (uc designation) = 'custom test'
I have a command to open some dwg files and print them. I´m using the Sub imprimePDF. When I did the code with (AutoCAD 2011 and VS 2008) , it runs ok but now it´s wrong.
This is the sub
Sub imprimePDF() Dim myDWG As Autodesk.AutoCAD.ApplicationServices.Document myDWG = Application.DocumentManager.MdiActiveDocument
[Code]....
When I´m debugging the code, last sentence produces an error: 'tr not declared' and I don't know why.
I got a problem to pass parameter from VB to batch file. My code is below to run the batch file and to pass parameter.
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click Dim input As String Dim output AsString input = "C:atchFile est.gds" output ="C:atchFile est.dxf" Dim batchFile As String = "C:atchFileLC_gds2dxf.bat" Process.Start(batchFile, input & ""& output) EndSub
With this code the output is like below:
If you look at the screen shot you can find out that input and output variable is passing to one variable LC_gdsin. But I want that output file location will be assigned to LC_dxfout. I tried a lot but could not able to do that.
An application that will let me choose a group of Drawing files (.idw) and perform "Save Copy As" to a PDF format on them. The Filename of each Drawing should be extracted from a custom Parameter I embeded in the IDW file.
I know I can use the Task Manager with a virtual PDF Printer to create these files, but then the PDF Filename will equal the IDW Filename, and I want it to be derived from the custom parameter I prepared inside the drawings.
I have a batch program which I want to launch from a LISP program.
First this is an attempt at an automated process whereby user input is extremely restricted. Other than the first click of the mouse on the menu item to save a copy of the file to a very restricted folder, no other user input is allowed.
AutoCAD, like most commercial apps writes a temporary file and then renames it when you choose save or saveas. And due to the restrictions in this folder that will not work. Crazy, I know but it's the parameters I must work within.
The batch file I'm launching calls another batch program in it's execution and I'm wondering if that could be where control is lost. But the thing is I can type this at the command line in AutoCAD:
(startapp "//a_very_long/novell_server_path/my_folder/vlisp/mybatchfile.bat") Â The whole process works great. The command window flashes briefly AutoCAD closes the active drawing window just like I want it to. And when I check that the dwg file has been copied to the restricted folder it's there and done. But when I place that same command within my LISP program or one like this:
(command "._STARTAPP" "CMD //a_very_long/novell_server_path/my_folder/vlisp/mybatchfile.bat")or(command "._STARTAPP" "CMD ""//a_very_long/novell_server_path/my_folder/vlisp/mybatchfile.bat"") Â or just about anything else I try it fails to run. Perhaps I've been looking at this problem too long. I think I may move on to a VB.NET process to do this but I am really baffled why it will run from the command line but not within the program.
I really hate the "JPG Options" Dialog Box while I was doing a batch job of Autocolor + Duplicate Layer > Mode SofLight. Is there any way to disable that Dialog box , or saving the settings as default so it won't come again in future ?
 I need to add "Level" into my Cable Tray schedule; we need to sort the cable trays lengths by floor level.  However, "Level" is not listed as one of the available fields, even though level information (show up as "Reference Level)  is one of the constraints in the cable tray model.
completely remove the white background. Because this will be a batch process that includes others lighter hats, I can only use a maximum of 10 as a tolerance. When placed on a black background, it reflects some white fringe.
I'm starting with the Magic Eraser (10 tolerance), then doing Layer/Matting/Defringe, and no matter what tolerance I apply there (up to 20), some white pixels remain around the edge. Very frustrating to find a happy medium process in order to batch various colors to an acceptable quality.
Is it possible to put a watermark on images in photoshop,like putting the word "preview" or "sample" on the jpeg,with a transparant type of effect on it?
Also would it be possible to do this in a batch process?
I have a batch of 1000 images that all need to be processed with the exact same levels adjustments and the exact same crop command. I recorded the necssary actions in photoshop, and I can now open up approximately 20 of my images and batch apply the actions to all 20 images automatically. The trouble is that I have 1000 images to process like this, and I can't open all 1000 in photoshop at once; it just kills my machine. I don't want to do the whole 1000 in little batches of 20 either. I'll be getting a new pile of 1000 images to process like this every day or two, so I need a way to do the whole 1000 automatically without user intervention. Â Is such a thing possible? Â I'm a software develoeper by profession, so if doing this sort of massive batch processing requires any command line work or scripting then I would totally be up for that.
I have a set of actions i need to run on a couple of hundred jpegs, they simply need a lens correction, auto colour and auto contrast, then need saving as tiffs, all works fine when i record the action, but when i run it on a folder full of jpegs, the tiffs are huge! original jpegs are around 5mb and the tiffs are 30mb, if i apply the save as to a file individually it seems fine (file size around 2mb)
In the save as section i have specified jpeg compression at a quality of 8, but it seems to miss this in the batch process, am i missing something?
I have several .psd images that I need to turn into .swf's. The only solution I can figure is to place the psd into illustrator and save. Is there a faster/easier option as I have hundreds of files that I need to do this to! I also need them to be .pngs.
I work at an animation studio where our artists work directly in Photoshop CS5 to draw storyboards (3 panels across). We are having major difficulties figuring out how to successfully convert our action (which exports the three panels as tiff images) into a batch process,
The action basically just selects each channel of the main storyboard (three channels for the three panel areas), copies/pastes the image into a new canvas, saves that new image as a tiff to the desktop. It does that for all three panels and yields three tiff images on my desktop, which I then have to drag and drop into a folder before running the action on the next page or else it will replace the previous round of images (saving over them). Â Using Automate > Batch doesn't work and I am wondering if it is even possible to run a batch or if the action is simply too complex because it creates three new image files.
Just recently got into time lapse photography and have been batch processing away to my hearts content. I have one scene that looks unbelievable with the "surrealistic" HDR toning preset. However, I record my action and set up the folders and set it to go, but it seems to want me to click "ok" after filtering each photo...there's 1685 of them, so not very keen on that.
I am making sets of wedding stationary for a photography studio. Each set contains an invitation, dinner card, place card etc.
Each set has a dominant color throughout the series.
What I want to do is offer each set in a variety of colors but going through each image, replacing the color in each layer with the new color for each image in the set would take forever.
Is there a way to "Batch process" this where I can replace a color in each image with a new color. I think I may have to make a separate action for each new color I want to use but that is still better than nothing.
Also, I need to keep the new images in layers as the studio wants the ability to go in and make layer changes if necessary.