AutoCAD .NET :: Iterating Through All Plot Devices?
Jun 16, 2011I am trying to iterate through all the Plot Devices (plotDeviceName) available to the user.
View 3 RepliesI am trying to iterate through all the Plot Devices (plotDeviceName) available to the user.
View 3 RepliesI'm working on translating a VBA routine that worked just fine, to VB.NET & I have had a lot of porblems with it. Yes, I am new to VB.NET. My routine renames XREF file names & opens drawings that have these files XREF'd into them & resets their paths to the renamed file. My VBA routine used a few thisdrawing.sendcommand operations to do things like reload xrefs, unlock layers etc. Some of these worked in the VB.NET version while I only had getten as far as having the only DWG open that was the one which I call the routing from. When it gets into opening another drawing I start getting all sorts of problems.
I worked these out by creating a NEWDOC as DOCUMENT object & setting autodesk....MDIcurrentdocument to the filename of the just opened DWG file & then eliminating my sendcommand calls & replaceing them with record table operations.
Now I'm getting a file access error when trying to reload an XREF using document.reloadxrefs(objectidcollection).
I've tried not to nest transactions. I've tried to make sure all my transactions frpm the current DWG not the original.
How to work with multiple DWG files. Maybe a simple example of reloading an XREF named "X" in a bunch of DWGs saved at some specific location could be given? Focusing on transactions, documents, & databases.
performance differences between:
1) Using a selction filter to get the objectIDs of a particular type, then iterating them, or
2) Iterating all modelspace objects, checking ObjectID.ObjectClass.Name for the desired type.
at multiple places i have drawn the same block in a drawing, and i would like select one block in the drawing, then iterate through the items in the block, and find the actual coordinates of a 3d-polyline (that is drawn in that block) in modelspace. How can I do this?
View 8 Replies View RelatedI have already a Selection Set called objSS. All the objects in this Set are Multi Text, so I am wondering how is possible to have access to the property Text Height of these objects inside the Set in order to change the value of this property. I have created a variable as AcadMText but is not possible for me to loaded it with any item from objSS.
View 3 Replies View RelatedI have a problem iterating heights when making a polyline between two different points that have Z-values. I've used Autocad Civil 3D for working with geodetic data with height measurements before and I remember using geodetically measured height values, transforming them into a surface and then when I create a 3Dpolyline within this area the polyline automatically gets z-values that change along the line.
In other words, I could use this 3Dpolyline to obtain a profile that gives me z-values even where there is no exact point with a value has been physically measured. It was a while ago I worked with Autocad and now when I started again I have a similar problem but can't manage to create a surface and get iterated values.
My exact problem this time is:
I have a sewage pipe that runs for several kilometers that is drawn as a 3Dpolyline, with correct x- and y-values. It doesn't have any z-values yet and these are what I want to obtain. I want the polyline to have continuous z-values that changes along the polyline (not only in vertexes) so that a smooth profile can be drawn if wanted. I have data of measured actual z-values for approximately every 500 meters or so along the sewage pipe and these are currently drawn as 3Dpolylines of around 20 meters going perpendicular to the pipe (as in the picture). In other words there are bars with z-values crossing the pipe all along the stretch. Now, what I want to do is to somehow make the polyline that represent the pipe to get the heights from these perpendicular bars with the measured z-values. If I try to draw a new 3Dpolyline between two of the measured bars where the actual pipe is supposed to be, the end vertexes of the 3Dpolyline gets the z-values of the bars. However, the value in between the bars gets the Z-value 0. So, if I start a 3Dpoly on bar 1 then continue the pipe with another vertex, and then finish off at the second bar I will have 2 vertexes with the correct z-value but the middle vertex will be incorrect (0). How do I get the pipe to get the correct z values automatically iterated from the values on the crossing bars? Is this even possible to do? Should I create a surface from the bars first, and in that case how do I do that? If possible I don't only want the vertexes between bars to have iterated z-values, I also want the entire line to have a correct value.
I've attached a crappy image made in paint (since I don't have Autocad on my home PC, only at the office). And just to make things even clearer I'll give an example. Let's say the pipe distance from 1 to 2 is 10 meters, the distance between 1 to 3 is 30 meters and the z-values of bar A and bar B is 10 and 25 respectively. So, when I draw a 3Dpolyline from 1 to 4, I want the vertex 2 to automatically get z-value 15 (since it's 1/3 on the way to B). In the same way, I would like for example the point on the pipe that is right in between 2 and 3 to have the z-value 20. I won't mind redoing the bars to for example singular points instead, if that makes it all easier.
My application, writing in C#, exports all vertex-data of parts in an assembly to external files.It uses the surfacebody.getExistingFacets method to do this and shows a progressbar to visualise progress.
The application works fine, only when it is finished, when I zoom in or zoom out in inventor, a huge delay exists before the actual zoom is done. And everytime I scroll the mouse wheel or touch my 3D mouse the delay is there.It's really up to several seconds everytime.
However when I close the assembly and re-open it again immediately after my app finished, these delays are not there anymore.Do I have recalculate something, or do I have to invoke a 'free-something' command ?
I have one drawing per file at model tab. When I need to plot a multiple page file, I use:
Print > Batch Plot.
The problem is that I have to set plot configurations ( plot style table, plot area, paper size, etc) in each file before use Batch Plot.
Now I received 722 files with a wrong Plot Style Table. For this time I change the associated *.ctb file at Plot Style folder, but I will need to associate the right *.ctb to each drawing. It's also common to have to change other properties.
I am trying to write a 'duplicateLayer' function, and I've read all the related posts on these forums. It seems most of the responses have only addressed art inside a layer, and not nested layers/groups. I need to be able to duplicate ALL items in a layer.
I can get the sub-layers, but I can't figure out how to preserve order of the items in the new layer. For example, if my layer looks like this:
layer 1
art 1
art 2
sub layer 1
sub art 1
art 3
I can call layer.pageItems to get my three art objects and duplicate them, and I can call layer.layers to get my one sub layer and duplicate it. But how do I preserve the same order of the art objects and sub layers with respect to each other?
I was wondering if there was a way to import devices on the same rung but in parallel. In addition, maybe even sereral devices going into another (ex: 3 phase motor).
View 3 Replies View RelatedI use AutoCAD 2010 and have never messed with MEP. Any way to convert those devices back to regular acad blocks.
We have a couple of seats of MEP and Revit just to test things out and see if we'd want to switch programs at some point, but otherwise we do everything on "regular" AutoCAD. Well, one guy went ahead and made changes to our sheets using MEP, and now it's causing compatibility issues. Ideally we'd like to fix that without having to redraw entire sheets or have to redefine our drawing standards mid-project.
I work on big manual and automatic workstations, cells, and lines.
Before shrinkwrapping, my part count usually hits around 13,000-17,000 parts.
Using Publisher seems to be the best way to present our ideas to customers all across the world.
But we have run into limitations where the message on our i-pads read "Filetype too large" (or something along those lines).
I have successfuly published and uploaded my files, so whats happening?
Is it a matter of rendering 400,000 or so triangles as a max?
How I can reduce the size and make these files work?
Shrinkwrapping has no effect.
I am a Mac user and new to AutoCAD. I am enrolled in a CAD class this semester and the instructor for my session is requiring Windows. Supposedly this is because AutoCAD for Mac does not allow for proper printing on their plot style setting.
I understand that I can install Bootcamp and Windows on my computer, but I'd really like to avoid that if I can. If I were to do my work on my Mac and then digitally transfer my files to a PC for printing purposes, would my files become corrupted or compromised in any way?
Where else do they keep this setting? I only have found it in Active Layout in extended dada
(entget (vlax-vla-object->ename(vla-get-activelayout (vla-get-activedocument(vlax-get-acad-object)))) '("*"))
The last pice of extended data is:
("PLOTTRANSPARENCY" (1071 . 0))
When i change it to 1
(setq layout(vla-get-activelayout (vla-get-activedocument(vlax-get-acad-object))))
(vla-getXdata layout "PLOTTRANSPARENCY" 'type 'data)
(vlax-safearray-fill data '("PLOTTRANSPARENCY" 1))
(vla-setXdata layout type data)
it stays there (extended data), but the setting in Plot dialog box doesn't change!!! And it still prints no transparency.
It takes to save the drawing and reopen it again to see the change.
The command -PLOT does not have this setting as well, so my options back to VBA or Lisp, but HOW?
I have a problem to plot thin lines and dots when Plot Transparency option is On in the Plot dialog box.
The lineweight is a half of the original. I think i have tried everything.
It shows correctly in the Plot Preview but when printed there are no dotted hatches and lines are much thinner.
Can users with a 64 bit computer share pc3's and pmp's with 32 bit users without adverse effects?
View 1 Replies View RelatedWhen I publish a drawing as a multipage DWFx (or PDF for that matter) with "Include Layer Information" selected, the Plot Stamp (Simple Date/Time and Text) comes out but on different layers on different layouts.
Example:
First Layout : Plotstamp resides on Layer 0
Second Layout: Plotstamp resides on Layer 3P
Third Layout: EQPT-VC
etc
Some general information:
Autodesk AutoCAD 2011 64bit
Autodesk DesignReview - 2012
Adobe Acrobat X Professional
Layer 0 Is thawed/plotable and on in all layouts, viewports all layers, viewports. It has at least one entity per layout
Is there anyway to rectify this and still use the built-in Plot Stamp?
So the firm I work at has AutoCAD 2000 and 2007. 2000 is installed on 5 out of the 7 computers, and 2007 installed on 6 of the 7 computers. 2 of the computers running just ACAD 2007 are Windows Vista, while all the other computers are Windows XP. We have an OCE TDS320 CAD Printer, an HP Wide Format Printer and a Panasonic 330 Copier/Fax/Printer. Our Problem is that When you try to plot an ACAD2007 drawing it will only plot it in color. This problem did not exist before 1/12/12.
When I select the Plot Style to print I select "monochrome.stb" which has always worked, now all of a sudden it doesnt. The only way i have found to fix this problem is to change my drawing to layer "0" which is white, so when it tries to print in color it will print black. Another Guy in the firm i work at has ACAD2007 on his computer running XP, he also has 2000 running on the same computer. When he tries to plot on ACAD2007 the same thing happens, so it is not isolated to my computer.
There is a difference though between his Plot Styles on his computer and the ones on mine. His end with .ctb, which works. It only doesnt work when he tries to print a drawing i made off of my computer. Because of this we copied his Plot Style folder for AutoCAD 2007 and installed it into the folder with all of my plot styles on my computer, replacing the ".stb" with ".ctb" That did not work at all. The last thing we tried was to copy over a file that plotted correctly, delete the drawing and draw what we needed, This also did not work. So basically we are thinking that ACAD2007 is not reading the Plot Styles correctly, or the Plot Styles are wrong or currupt.
I have several objects on various layers in model space and they are exposed through a viewport in a paperspace layout. I also have a corporate CTB plot style.
Here is my problem: If i plot the objects from model space, they all plot with the correct lineweights as defined in our corporate CTB, but when i plot them from the paperspace layout, some but not all objects plot with a heavier lineweight than what is defined in the CTB.
I thought the CTB was supposed to override any settings applied to individual objects, but more importantly, why the different results, on the same objects, depending upon the space from which they're plotted?
I have found that when I Publish, the drawing comes out shifted about 1/8" down and 1/8" left as compared to when I use Plot. Which of course is just enough to cut off the sheet border which is 1/2" from the paper edge. I am using the same Page Setup for both Publish and Plot, same drawing.
This is to an Oce TDS600, and it only happens with 15x21 paper size. All paper sizes are set to 0" border. Probably an Oce issue, but have any of you seen this before?
I recently upgraded from 2010 to 2012 and when trying to plot, using the very same page setups as before the upgrade, the quality (or resolution) of the plot is very poor and pixelated. I am using very high resolution aerial imagery. The output is not at all high resolution (totally pixelated, not presentable as professional). It seems like AutoCAD is reducing the image quality now. Is this a system variable that can be adjusted?
View 1 Replies View RelatedI have a stationing line. I've used the block PTTICL to make ticks. The ticks display perfectly. I'll run through a plot preview and the ticks show on the plot preview. I push plot go to the printer and the ticks are not plotted.
I've checked the layer. They are on a layer that should print.
I've checked the block. The block is created on a layer that should print.
I've run through a number of options regarding the alignment label properties and found "display" to be equal to "true."
Everything else plots just fine. Only the station label ticks refuse to plot. My project is fairly short so the work around was to put a poly line right on top of the tick mark.
AutoCAD Civil 3D 2013.
I have just switched over to 2014 and i cannot for the life of me get my batch plot to plot PDF's to a single file! Instead, it's printing all 37 layouts separate. I tried switching between multi-file & single file in the publish options, but nothing!
i know that it took me a while to perfect my settings the last time i set up a new version, but i am struggling to work it out now.
I am aware of the plot stamp available in the Plot Dialog box, however, we are looking at ways to imbed this info in the dwg. I currently have the WD_TB with an attribute for FULLFILENAME, an attribute for PLOT DATE, and an attribute for PLOT TIME12. So I get the information on the dwg. I would like to be able to run all these attributes as a string. I have tried FULLFILENAME|PLOT DATE|PLOT TIME12 with spaces, commas, ( ), " ", etc. and I do not know the proper syntax to get this to work. I have also tried (getenv "FULLFILENAME") or the getvar, in the title descriptions box.
View 1 Replies View RelatedAutoCAD Architecture 2011
Windows 7 x64
8GB RAM
Created new PC3 for KIP 3100 plotter using its AutoCAD Heidi driver for Win7x64. Upon plot preview the following error occurs.
This causes a crash report which has been submitted to Autodesk. The response was to install service pack 2. Error still occurs after installing the service pack.
Using the non-AutoCAD driver works.
In AutoCAD 2014 and ASD2013 I cannot choose one of the printer, which is installed on Windows (OCE TDS600). It is strange, because Autocad sees it on the list of available plotters, but when I try to select it - it automaticly changes to "None".
The plotter is properly configured - I can print with it from Revit 2013 without any problems. Also when I switch account to any other (on that same computer) everything works fine.
I tried to add this plotter through "Add-A-Plotter Wizard", but each time I obtain an error massage "Autodesk Hardcopy component failed..."
[URL]
Unfortunately I am using ACAD 2000 so bear with me and the only ACAD training I have is a 3 day crash course at the local software reseller.
I am attempting to plot a drawing that was created from a template into a .pdf but it is plotting colored lines instead of black lines.
Here is some background info. My template is set up as a .dwt which I will save as a .dwg when I begin to make my drawings. Plot style table is “monochrome.stb” and I have selected Adobe .pdf as my plotter configuration. I then select the “Properties” then go to “Custom Properties”, “Paper/Quality” tab and then select “Black & White” as my color.
When I go to plot the drawing as a pdf and do a preview of what I am about to plot, I see that the lines that make up the drawing are a shade of gray in color. All my lineweights in the layers property manager are set to default. I have attached a blank drawing that is based off of my template.
2004 and how to turn "plot to file" off? Any time they go to plot the plot to file is already set and grayed out. It has been way too long since 2004 and I don't know where to have them look although I assume it is in Options somewhere.
View 2 Replies View RelatedI'm using autocad 2011 LT License version 5 users & autocad 2012 Lt License Version 5 users.I have got a HP Laserjet 5200 printer, when i give a plot command from one of the workstation having autocad 2012 lt
the application gets terminated automatically every time.This issue is only with a single client having 2012LT all other autocad LT 2012 workstations in the same network plots w/o any complaint.
I have a user which we just installed Autocad Civil 3D 2014 on his computer that is running on a Windows 7 64-bit OS. However, he has had the same problem with Civil 3D 2011, 2012, and 2013 ever since we took him to 2011 in September 2011. So, it is not something new. It may have been around before then but my companies common practice back then was to freeze layers with a script file before plotting. While attending a class back in 2010 or 2011, he and his group were told to “do not use FREEZE on layers in Civil 3D” since things frozen did not get updated like they would if they were just turned off. So, they have been using the “ON/OFF” commands on all Civil 3D files since then.
Here is the problem:
A drawing, typical of this and other jobs he does, has a title block which is an xref in paper space and the site plan xref in model space. He can turn "OFF" certain layers from the site plan as viewed from paper space to remove clutter and then go to make a plot. After getting it set up to print and going to the preview the layers he has turned off appear in the preview and if he goes ahead and makes the plot or PDF those layers that were turned off will plot out.
The work-a-round they have been using ever since has been to go back into the file(s) and “FREEZE” the layers that were turned off, make the plots and then go back and “THAW” the layers before ending the drawing.
Things we have tried:
Set Visretain=1
Used the “Publish” command.
Set Layerevalctl=0 or 1
Is there a way to use ON/OFF instead and have the layers NOT plot out? OR, is this something that AutoCAD will not do regardless? Has it always been that way and we have been unaware of it through the past four releases?
AutoCAD - Why does the Normal plot style plot in color? Black seems to make a lot more sense. Almost everyone in Architecture uses black prints most frequently so that should be the default. And you can't adjust Normal to all black. So what was AutoDesk's reasoning?
View 9 Replies View Related