AutoCAD .NET :: How To Use Acedssget () Function Using C#
Jan 6, 2013How to use acedssget() function(use this function to select by crossing polygon) in autocad development using C# .
View 6 RepliesHow to use acedssget() function(use this function to select by crossing polygon) in autocad development using C# .
View 6 RepliesThis seems absolutly silly.
(setq p1 (getpoint))
(setq p2 (getpoint))
(setq Dist (distance p1 p2))
Why does this not work?
I'm trying to build a command to replace AutoCAD's "DI" command, to give distance and delta x, y, and z values in decimal and imperial, and keep the angles in XY plane and out of XY plane.
I'm trying to be able to have a function run another function with the secondary function being passed as an argument to the first. I'm trying to create a recursive function and the recursive part works great. I just need to be able to have the recursive function run other functions to actually do stuff.
Here is something I found that should do what I need, mainly run a function from a function name in a variable.
Sub test() Dim ftnName As String Dim argument As String Dim result As String ftnName = "myFunction" argument = "cat" result = Application.Run(ftnName, argument) MsgBox resultEnd SubFunction myFunction(inString As String) As String myFunction = inString & " has " & Len(inString) & " letters."End Function
However I get the error "object required" on the "result = Application.Run(ftnName, argument)" line. So I'm guessing the Inventor VBA doesn't like this method of doing this. I'm just hoping there is a way to do this or this function will be useless or reduced to hardcoding functions which still defeats the purpose.
Is there a way to run some code as soon as a .dll file is loaded without having to using lisp (command "Function_Name")?
View 5 Replies View Relatedhave just loaded 2013 along with service pack.
dtext function not working. when doing dtext but using the insertion point of some previous text. will not move to next line unless some text placed on first line. is there a setting, no issue in 2011
ACLT2000 on a Windows XP machine.
In the last day, one of our users has lost his ability to Group. Whether he selects objects and then pulls down "Group" from the tools menu or vice versa, the objects do not group. The command line text doesn't give any errors or other indication of what is happening.
I am trying to use the "Export to pdf" function as opposed to plotting as a pdf because the "Export" function seems to make a much smaller file size. However, when I "Export to pdf" some of my layers are not showing up in the created pdf.
The pdf created when I plot to pdf looks fine. I am using the "current layout" and "current" page setup options in the "Export to pdf", so it is using the same plotting options as plot to pdf, but the "Export" function is not displaying some layers.
I have a big assembly consisting of a large number of sub assemblies and parts.I would like to be able to quickly show color alternatives. All painted parts will be painted in one of two colors.I would like to have a function that takes two color arguments that will set the color of a number of parts to the first color and some other parts to the second color. Not all parts need to be painted.
set the color of all parts in a assembly to one color.But I have two sets of parts for different colors and not all parts need to be colored.How can I do this best? iLogic? How do I have to input the colors?
How to deal with repeating patterns (should still work when changing the repeat count)?Also, there should be some text on some parts. Can I also change this text color automatically?
have finished loading 2007 onto them.Now, back with 2006 we could set osnaps to the function keys (e.g. F2 to snap to END). I have been told that you can't do this with 2007.
View 9 Replies View RelatedI am running CAD 2007 LT. Old laptop runs windows XP. On black Friday I purchased a new laptop with windows 7. All is well except the F3 & F8 I am so used to aren't allowing me to toggle on off. I have discovered that the fn button (lower left) by the ctrl button will let me toggle 1 time but have to hit the fn each time then F3 or F8.
View 9 Replies View Relatedi dont know how to use or find the PCD function. All i have is a base however i need to make holes with 90 degrees on a 100 PCD
View 2 Replies View Relatedchanging the F12 key. I want to use it set the UCS to object. I assume it done be amending the CUI. I found the shortcut for the current use of the F12 which reads
'^P'_.dynmode $M=$(if,$(>,$(getvar,dynmode),0),$(*,$(getvar,dynm ode),-1),$(getvar,dynmode))'
what I need to type to set the UCS to object.
I'm trying to create a rib from the sketch shown. Before I go to support with this, how to make it work or why it won't? I think Inventor just isn't up to it. If I add perpendicular lines to the endpoints of the line shown, it'll make rib, but the rib isn't right - i.e. it doesn't maintain tangency the way it should. I'd rather not have to go through and surface it.
Infrastructure DSP '14 / Product DSP '14 / Vault Professional 2014
Dell Precision T1650
Windows 7 Professional SP1 64-bit
Intel E3-1270 V2 3.5GHz / 32G RAM
Nvidia Quadro 2000, Driver 331.82
Space Navigator, Driver Version 6.17.7
i am trying to recall how to use the above mentioned function to plot suveyed points into CAD and it is wrecking my head
i can get one point on but to add multiple points is beyond me at the moment.
I have recently installed Inventor 2013 Professional Ultimate and am having some issues. I can not seem to get the Thread function to work. When I go to apply a thread I get the follow error....
When I go to search the directory, I find that the Thread xls document is infact there, but it is not located where the program thinks it should be (XLS Folder --> en-US Folder)
I also made sure that the Design Data location was correct within the Application Options...
A reboot of the computer did not work.
I've got a custom VBA function that works perfectly when called from a parameter in my part.
However, when in the context of my assembly, there is no error, but the function no longer runs, and the parameter text is red.
Apparently, the function is no longer in context?
I've heard of external rules, but have never implemented one.
Is there a way to declare my function and keep it in context regardless?
Public Function BumpHeight(dblHeight As Double, dblMember As Double) As Double Dim X As Integer X = 2 If dblHeight > dblMember * 2 Then BumpHeight = dblHeight Else BumpHeight = dblMember * X End If BumpHeight = BumpHeight / 2.54 End Function
Here is the Parameter:
VBA:BumpHeight(ValanceBackBumpoutHeight;ValanceMemberSize) * 1 in
Update: (problem better defined)
What seems to be happening is that once I insert the part into an assembly, it creates a new blank copy of the parts' modules in VBA and the functions no longer work.
If I go to the VBA editor,
There are now two copies of my part listed in the browser tree, but the new one is blank.
If I paste in my function to the new one, it will work until I return to the parent assembly.
Next time I come back to the part, it will have a new blank set of modules.
This appears to continue indefinitely...
see the attached screenshot.
At this point there are only 2 copies of the DocumentProject. The original still contains my functions, but the new one is blank.
I need these functions to work in order to build my model.
I have purchased the Autodesk Product Design Suite Premium. It comes with the Frame Generator but does not seem to have the Frame Analysis with it. Is that provided in other Suites or should I have it??
View 1 Replies View RelatedI would like to return multiple objects from a function. can it be done? and how?
function DrawLines()as object
objline1 as new line
objline2 as new line
[..]
return 'objects'
[code]....
I am having on going issues with the DYNMODE function in AutoCAD 2013. I know to turn off completely set to 0, but it keeps frequently turning itself back on and setting itself to -1?!
Not a huge issue I know, but I do not like this command at all. How I can turn it off completely?
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.
When I use AutoCAD Inventor:
* Rolling the mouse wheel toward me, the object zooms larger, and
* Rolling the mouse wheel away from my body, the object zooms smaller.
Just the opposite, when I use good ole' 2D AutoCAD and AutoCAD Electrical:
* Rolling the mouse wheel toward me, the object zooms smaller, and
* Rolling the mouse wheel away from my body, the object zooms larger.
Is it possible to change the zoom function in 2D AutoCAD and AutoCAD Electrical to operate in the same fashion as in Inventor . . .
When creating a part in .ipt, you can press F7 to remove everything forward of the plane that you are sketching on. Is there a similar function when you create a part in an assembly that removes everything up to the sketch plane?
View 5 Replies View RelatedI am creating a drawing template that everyone in my office will use, stored on a shared location. I want the label "Drawn by ...." in the title block to be filled automatically with the drafter's name who created the drawing. It would be easy to just add the field "Author" or "LastSavedBy", but my situation is more complex. Our workstations are identified by a code that consists of first two letters of given and last name, for example John Smith's computer is named JOSM. So if I use "Author" field, then I would get "Drawn By JOSM", but I want to get "Drawn by John Smith".
I would like to some how create a field that contains function:
IF author=JOSM, value=John Smith
IF author=MAST, value=Mary Stuart
Is it possible to create such functionality? I found out something about Expressions and Diesel Expressions, but didn't understand much.
I have an ilogic external rule which contains functions that I use from rules in my local assembly document. I'm trying to access the value of a parameter in the document from the external rule's function. Attached is a simple version of what I'm trying to do. If I manually run the external rule, it seems to work just fine, but when I call on the function from a seperate rule, its unable to get the parameter value. I get an error stating, "'Parameter' is not declared. It may be inaccessible due to its protection level."
'this is the external rule. if I run this manually, it works
Public Class test_functionsSub Mainmyresult = ""thisisatest(myresult)MsgBox(myresult)End SubFunction thisisatest(ByRef resultcreated As String)resultcreated = "it worked - " & Parameter("ParameterInDocument")End FunctionEnd Class
'this is my rule in the assembly document trying to use the external rule's function
AddVbFile "z_testrule.iLogicVb"Dim external_rule As New test_functionsmyresult = ""external_rule.thisisatest(myresult)MsgBox(myresult)
Is there a way I can add a macro or formula in a label style definition?For instance, I'd like to show the difference in elevation for the ends of a line and whether it's a cut or fill without having to do everything manually.
View 2 Replies View RelatedIs it possible to animate the Grounded function? I want the box (In the assembly that I attached) to walk through a line of stations, each one of them with a specific purpose, in a factory where the "solar collector" is being built.I am unable to switch between who's gonna be grounded during the animation, but maybe there's another way to do it?
View 6 Replies View RelatedI 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 RelatedI have a function that uses AcadApplication.ActiveDocument.SendCommand to allow the user to scale the inserted lines and text before the next step of the process, but AutoCAD does not display the scale prompt until after the entire program finishes. The prompt works well, but needs to be displayed before I end the sub.
How do I get the command to be sent immediately? Is there another way to allow users to scale the items I insert? The screen needs to be refreshed before the scale command is called, so that the lines and text I just added shows up. I have attached the code for the Send Command call and for the function that calls it.
In the Add function documentation there are two parameters XDirectionStartPoint and YDirectionStartPoint.
But are these 3d or 2d points? Maybe 2d points on a sketch.
And if there was a c++ example of use it.
I typically use the function keys to toggle osnap, polar, orthomode etc. on & off. Now what happens is that when I use any function key it changes the setting for the previous F-key press. It does this once, then reverts to normal behaviour. For example:
F3 Osnap On
F3 Osnap Off
F3 Osnap On
F10 Osnap Off
F10 Polar On
F10 Polar Off
F8 Polar On
F8 Ortho On
I have a series of blocks with all the same attribute tag names. I need to create a function that allows me to change a block from one to another within a drawing.
Can I do this by just changing the block ID? or do I need to go through and grab all the info from the old block and insert a new block with the attribute values and then delete the old block.