AutoCAD .NET :: Calling / Modifying Existing Commands?
Jan 3, 2014
I'm really curious, is it possible to call or modify/inherit any autocad command? I'm looking to create a command that hatches the area between an offset, but I can't find any material on how to even utilize existing commands.
View 6 Replies
ADVERTISEMENT
Nov 15, 2013
I have a simple lisp function to add a scale axis to a drawing by calling a script, renamed the drawing by appending "withScale" to the file name, and then closing the file. I placed a call to the function in the acad.lsp file in the startup suite. The idea was to batch process all files by simply opening them. Upon open the startup acad.lsp file runs, which calls my lisp function, which in turn calls the scale script. It should then execute the renaming, saving, and closing commands. The problem is that it is calling the script fine and renaming the file, but it does not save the changes before closing. Here is the lisp function
(defun saveScale(); (command "-purge" "all" "" "n")(if (findfile "C:/Users/Russell/Desktop/TreeFiles/Automation/Scale&Key.scr")(command "_script" "C:/Users/Russell/Desktop/TreeFiles/Automation/Scale&Key.scr")); end if (command "_.zoom" "e") (command "_saveas" "2013" (strcat (getvar "dwgprefix") (vl-filename-base (getvar "dwgname")) "withScale.dwg")) (command "close") ) (saveScale)
Apparently you cannont run any lisp commands after calling a script, however the renaming still follows through.
I've attached the script file as well. (I couldn't attach .scr format so you may need to rename it).
View 9 Replies
View Related
Feb 5, 2013
How do you create a block within a layer and set scale to same as other saved symbol blocks.
View 2 Replies
View Related
Jul 23, 2013
I've recently (this morning) come into the issue of the old plot printers being saved in CAD files. I've found a number of tutorials online about adding new pages, and setting the default plotter to "none" via DWGTruView, but these are just shy of what I'm looking for.
Is there any way to tell AutoCad 2013 that if the current/default plotter is "None" to set it to a certain printer? I have about a thousand CAD files that need this change made on them, so obviously a more automated approach would be greatly appriciated. Currently the entire set of them has has their Plotters set to "None", and a custom Page Setup configured.
View 5 Replies
View Related
Sep 5, 2013
I'm trying to work out how to modify an existing, out of the box Revit family, a window, to create a new one, and struggling with it.
What I'm looking to do is to take the family (from the metric uk template) "Windows_Sgl_Horz_Bars.rfa" and add a second window bar in. What I'm finding is I can copy the window bar extrusion easily enough, but getting it to constrain to the sides of the window frame as the middle one has been done (position not changed from the original) , it doesn't work, when I flex the model I keep getting "constraints are not satisfied" warnings.
When I move the copied extrusion to the sides it looks like it is snapping to the constrain line of the pre-existing window pane, I don't understand why the new alignment with an existing one doesn't work.
I had been looking to generate a lot of new family content by modifying what has come out of the box, if I can't fathom it, its going to be a lot of work.
View 6 Replies
View Related
Aug 14, 2013
I have the "create section view" command.
Ok, I'd want to have other (others) custom command "create section view2" and optionally call it from an icon.
These commands are saved with the drawing? ( I think yes). Would be there a possiblity to have easy access to this elements to deal with them ? Is it impossible?
Having custom commands cloned and customized from existing
View 1 Replies
View Related
Mar 19, 2012
Any way to override existing AutoCAD commands.
Lets try this. When a user types "line" at the command prompt, or hits the "line" button on the toolbar, or chooses "line" from the draw pulldown menu, is there any way I can re-write what line means and draw a circle? (Extreme example)
There are just some commands that I'd like to have a variable set in the background, depending on what the command is. So I'm thinking if I could re-write the "line" command, instead of trying to convince everyone to use and remember a custom command, it would be much more efficient. There are lisp files already loaded in their start-up suite. Not sure if that works.
View 4 Replies
View Related
Apr 4, 2013
In an object type Project I have a form with a button that calls another sub of the same form, the code looks something like this:
Private Sub CommandButton1_Click ()
'Set a Part Document as active document
Dim oDoc As Inventor.PartDocument
Set oDoc = ThisApplication.Documents.Open ("C: Users oZteC Documents Inventor Experiment part1.ipt", True)
oDoc.Activate
'Call "ModelParameters" within the same form
Call ModelParameters
End Sub
____________________
Public Sub ModelParameters ()
....
End sub
I want to move the sub "ModelParameters" to the object type PartDocument, the problem is when I move it the call doesn't work.
I want to run something like this:
ApplicationProject> Form> ClickButton ----> call to ----> DocumentProject> ThisDocument> Sub
View 1 Replies
View Related
Apr 18, 2013
I have overriden the rotate command to get a selection set and do something extra if it contains one of our custom objects.
However if it contains any standard autocad objects I want to recall the original autocad rotate command with a SelectionSet of these objects.
I know I can call the rotate command using:
acedCommandS(5005, __arglist("._ROTATE", 5005, "\", 5000));
However this will call the rotate command from the start and ask for a new selection set. Is there a way to call this with my selection set?
View 1 Replies
View Related
Feb 7, 2012
I'm getting this error "Run-time" error '48' "File not found: *****.arx" calling functions from VBA (Autocad 2011 64b).
note that same code (VBA & ARX) works fine on 32b env.
View 2 Replies
View Related
Dec 17, 2013
I would like to make an Inventor AddIn with commands (functions) that can be called from other standalone applications. I have tried to create a COM interface for my AddIn, and that works with rather small effort, but I think I have heard that it should be possible to do this without the COM interface. I would like to avoid COM if possible. if I need to do anything special in the AddIn to make the function visible and how I on client side calls the function.
View 1 Replies
View Related
May 20, 2013
I have a top level assembly created from multiple subassemblies. In my drawing view, I would like to add leaders calling out the subassemblies. Is this possible with Inventor 2013? It seems easy - am I missing something?
I tried adding leaders, and selecting the model properties, selected the subassembly, then picked part number. The leader always reverts back to the part level.
Product Design Suite Ultimate 2014
Vault Professional 2014
Windows 7 Pro SP1
HP-Z400: 2.67 GHz 12 Gb Ram
Nvidia Quadro FX1800 driver 276.42
View 1 Replies
View Related
Feb 14, 2013
The explorer Windows when selecting file from the context menu to bring up the iProperties. Properties window creates a file C:Program FilesAutodeskInventor 2013BinDTCPexe.exe?
As most applies the program DTCPexe.exe to cause property to C:Part.ipt?
View 5 Replies
View Related
Oct 17, 2007
I'm finding Mleaders with Mtext don't seem to play well with command calls. All works fine until one tries to enter the mleader text. Before testing this, be sure your mleader style is set to use mtext. I recommend starting the leader with the arrow first.
Compare this mleader's text entry behavior in this basic lisp command call:(command "_.acad_dim.mleader") with the following routine that relies on an open ended command prompt (useful if you want to add more commands after calling the mleader command):
(defun c:mlx (/ cc_echo)
(prompt "
Example showing mleader mtext misbehaving")
(setq cc_echo (getvar "cmdecho"))
(setvar "cmdecho" 1)
(command "_.acad_dim.mleader")
[code]...
With qleaders, the leader and text are separate entities.
View 9 Replies
View Related
Nov 1, 2012
I have been trying to create a macro to control an assembly. The problem is that I need to access a certain parameter in a specific part in the assembly. I can get the exact parameter by using the "name" of the given parameter, ex .Item("d7") to call the parameter d7. The problem for me has been what name do I use to call out a given part, I have been using .Item(Index number), ex .Item(12), but this number can change as parts are added, deleted, or suppressed.
The question is what "name" should I be using and how do I use it. I have tried
"InternalName", "PrimaryDeselGUID", "DisplayName", "FullDocumentName", "FullFileName"
but there is no "Name" to input like the parameter.
View 5 Replies
View Related
Sep 6, 2013
I am getting Invalid Object array error on following line:
oSourceFile.CopyObjects(objCollection, m_oActiveDoc.Blocks);
Code is given below
[URL]........
View 3 Replies
View Related
Nov 18, 2011
What is the code to call an image tile menu from a lisp command. I currently have a menu item that calls this image tile menu: $I=TYPSMBL1 $I=* but I want to have a keyboard shortcut as well "SL".
View 1 Replies
View Related
Mar 13, 2012
I've got a subroutine that gets the centroid of a closed polygon (lwpoly). It appears to fail if the polygon has any zero length line segments. I've added a trap that catches the error and "highlights" the offending polygon, but it stops there and does not return to the main function that called the subroutine. Is there a way to get back to the main function from the trap?
Here's the subroutine (original function by _gile (Autodesk LISP Forum 9-18-2006):
(defun return-centroid (lwpoly space / obj Region Centroid)
(setq *error* trap1)
(setq obj (vlax-ename->vla-object lwpoly))
(setq Region (vlax-invoke space 'addRegion (list obj)))
(setq Centroid (trans (vlax-get (car Region) 'Centroid) 1 0))
(vla-delete (car Region))
[code]....
View 2 Replies
View Related
Sep 28, 2012
I'm trying to create an all new existing surface over existing ground. I have a TIN surface of the EG, and I have drawn overlay splines that describe the new surface, but how to go about creating that design surface.
It is a compound surface, open on one end and closed all around on the other, somewhat like a half of a football stadium, but with an irregular upper edge because I am needing to figure out cuts and fills to manipulate the EG into this new surface without costly major terraforming. There is about 40-50' vertical elevation between the "field" and the upper rim with a generally constant 7-10 deg. slope all around. I'm just at a loss to figure out how to approach this project, and am quite new to Civil 3D.
Civil3D 2013
MacBookPro 17 - 2.4GHz Intel QuadCore i7 (Late 2011 build)
Microsoft Windows 7 64bit
350GB Bootcamp volume
View 2 Replies
View Related
Mar 28, 2005
I just got a freelance job cleaning/sharpening and generally making beautimous, about 100 deep sea photos...all was going according to plan, when I came upon a large group that, as soon as I brought the levels up, along came these horrific sprays of water spotting, that I have no idea how to deal with. I don't think there's a way to make it look real if I use a tool like the clone or bandaid, and I tried working in LAB mode, to see if there was any way I could make a difference with the gaussian blur, but that did nothing, and that may just have been hopefull. I can't remove the guys background, and I know there are some extra softwear programs that work with spotting etc. but in this case I can't see how they would work and still keep the picture sharp..?
View 6 Replies
View Related
Jul 28, 2011
app name, but is there any way of using (calling) operations from inside my C# code?What I'm saying is that, there is a SDK through Paint.NET so I can have simple Image Editing from my custom application?
If not, is there a way to call Paint.NET trough my code, make some editing and then closing Paint.NET continue handling the iage from my C# app?If this is not suitable for my needs, any simple Image editing tool so I can use through my C# application?
View 2 Replies
View Related
Jul 17, 2013
I want to create on the symbol an mouse over event that address the same symbol.
i've tried
this.css("display","none");
with no success..
View 5 Replies
View Related
Feb 27, 2014
Today I got an error message when trying to export a photo. It has never happened before. Win32 API error 2, system cannot find specified file when calling Shell Execute ExW from AG Workspace. shell execute
View 2 Replies
View Related
Mar 26, 2014
This is a tricky one, but it may just be that I don't understand the syntax,
Situation:I have an Edge Animate composition that is acting as an interface and container into which other content is embedded using an iFrame. I have several functions in Stage > creationComplete, and for one of the embedded content pieces, I want to include a button that calls one of the Edge functions.
Challenge: I have read about referencing elements within Edge when it is the Edge file that is embedded on an HTML page, but I cannot figure out how to reference Edge in the reverse.
I have tried these options where headerselect(page) is my function:
AdobeEdge.getComposition("EDGE-531849691").getStage().headerSelect("co mmunity");
window.top.Edge.getComposition("EDGE-531849691").getStage().headerSele ct("community");
View 3 Replies
View Related
Nov 15, 2012
Some background: We have a composite surface of existing surveyed contours as a TIN pasted into existing aerial contours that we received from a client. We used polylines to generate our proposed contours, and then generated a proposed surface from that. We've made a blank surface, pasted in the existing surface, and are trying to paste in our proposed surface... only the existing contours outside of the proposed suface no longer line up correctly once we do.
We've tried applying the method laid out here: [URL] ........ (and the link referenced in the bottom) but are still having trouble getting the surface to work. We've tried offsetting as little as 0.25' and as much as 5' with the feature line draped over the existing surface, but it seemed that the greater the offset, the greater the discrepancy.
Just to make sure we even tried that correctly - should the breaklines that we add be standard or non-destructive? (I've tried it both ways with little success either way, so I don't know if it matters much in this instance, but perhaps for future reference it would work.)
I've attached a screen shot of our surfaces. The pink and green lines are the proposed contours, the white dashed are the existing. The outer red line is offset 0.25'. As I've mentioned, we've tried offsetting various amounts with decreasing success.
View 9 Replies
View Related
May 23, 2012
Quick question...
Once a 3D object is drawn/completed in Inventor LT, how does one go back to the object to change the length/radius of certain objects without having to completely redrawn the object. For instance, imagine a bike wheel that is fully draw. Later perhaps one wants to go back to the wheel and adjust the radius of the spokes and the length. How does one do this quickly. In 2D I see how, but can this also be done in 3D with Inventor LT?
Working with... Autodesk: AutoCAD Inventor LT Suite 2013 | OS: Windows 7 | GC: ATI 6670 | Mem: 8 gigs RAM | Proc: Intel core i5 | Monitor: Acer V213HL
View 4 Replies
View Related
Feb 27, 2013
I have created this function that is to move all the attributes based on a startpt and a newpt. If the last argrument to the function is true, all attributes move the same amount in the x & y direction(this part is working fine). If the argument is false. I want the attributes to align with the x value of the first attribute. It works unless the user has set a UCS. I need to align the attributes to the UCS not the WCS. Can't seem to figure out the right transformby to apply.
Public Sub MoveAttributes(ByVal Blockobj AsObjectId, ByVal stpnt AsPoint3d, ByVal endpt AsPoint3d, ByVal alignatt AsBoolean)
If Blockobj.IsNull ThenExit Sub
Dim attributeDistFactor AsDouble = 0.1371425
Dim xmove AsDouble = stpnt.X - endpt.X
Dim ymove AsDouble = stpnt.Y - endpt.Y
[code]....
View 1 Replies
View Related
Mar 22, 2013
I am trying to do a "quick and dirty" stopgap.
I am in the process of repairing and assembling the various systems for a luxury yacht - electrical, mechanical etc. The ultimate goal is to get a full 3D layout of parts and assemblies, then using tube and pipe and cable and harness to run conduits, aircon ducts, fuel lines....
All I have to go on are .dwgs
In the meantime I need to submit a modified .dwg to the engineers overseas to get the O.K. on swapping the order of certain components. All I need to do is change the labels text on the layout, nothing else.
I have imported the .dwg into an Inventor sketch and edited the text.
Now I am stuck. Placing the view into a new drawing shows nothing.
RMB export sketch as .dwg works, but not a single line of text shows, only the layout.
View 5 Replies
View Related
Apr 10, 2012
I have been fortunate enough to have been given access to use a plasma cutter at a local community college, of which I am employed. It is a new Torchmate system (4'x8'), The design computer is loaded with Torchmate 5 CAD. I wanted the ability to design at home and then import the .DXF file into the torchmate to burn my designs. I have loaded Autocad 2012 and only work in the 2d mode, which leads me to my question.
If I draw straight line and want to modify the line in Torchmate CAD/CAM I can edit the nodes and pull the line into whatever shape I would like.
Can this be accomplished with Autocad as straightforward as this? If so can you explain how I would do this? I have played around with this for a few hours but the closest I can get is using a the Polyline tool, but I am not able to add or delete nodes that allow me to customize my line.
View 5 Replies
View Related
Nov 15, 2012
Does AutoCAD LT support feature like this?! : If I have the same objects copied in different locations in design and I need to change something in this object! Is it possible that I modify the original or one of the objects and all other(copies of the one I modify) objects change accordingly?!
View 2 Replies
View Related
Jun 5, 2008
URL.... "Failed to launch server application" when trying to edit a bitmap out of CorelDraw, only later saw that specific post was for X3. I have the same trouble, only with X4.
To recap my problem: When calling the "edit bitmap" function in X4 - I receive this message: "Failed to launch server application". Paint opens, closes, opens, closes and then the message pops up.
I tested several files, different bitmaps, different dpi's, new files with newly converted bitmaps (filled rectangle to bitmap). To no avail.
View 12 Replies
View Related