AutoCAD .NET :: Return AssocVariable By Name
Feb 15, 2012Is there a way to get an AssocVarible by specifying the name of the variable rather than iterating through all the Actions returned by the AssocNetwork.GetActions property?
View 2 RepliesIs there a way to get an AssocVarible by specifying the name of the variable rather than iterating through all the Actions returned by the AssocNetwork.GetActions property?
View 2 RepliesIs there any way to return the path to the dll that has been used in Netload the addin application?
View 4 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]....
C3D 2010 user
I have a problem modeling intersection. This is first time I am modeling intersection. I have gone thru' and actually did all intersection tutorials offered by C3D and naturally I felt like I am ready for it.
But in real world I am not. I am trying to model intersection and I keep getting error as "Value on Wrong side of alignment to profile". I looked at target mapping and thinks so that all is okay (may be not). I am attaching snapshot of error message as well as plan view. I wanted to forward actual dwg but size is too large to post.
Point to note:This is Left lane driving setting. I realized this after I created alignment/profile/assemblies but before I tried intersection modeling.
I did 8 iterations before this post.
Arcticad gave me code to work out the right keywords to search for. The only google hit was a chinese website.I added it to his/her code but didn't delete any of the existing handlers just in case.
Imports Autodesk.AutoCAD.RuntimeImports Autodesk.AutoCAD.DatabaseServicesImports Autodesk.AutoCAD.ApplicationServicesImports AcApp = Autodesk.AutoCAD.ApplicationServices.ApplicationImports Autodesk.AutoCAD.EditorInput<Assembly: ExtensionApplication(GetType(VbExtApp))> Public Class VbExtApp Implements Autodesk.AutoCAD.Runtime.IExtensionApplication Private DocMan As DocumentCollection 'Initialize sub.
[code]....
I've noticed this annoying trait in AutoCAD 2012 when drawing a polar array that I hadn't noticed in previous versions. I used to get stuck in a loop having to repeatedly enter the number of items in the array trying to get it to move on to the next command prompt of what angle of fill I required.
Example
CMD = Enter number of items or [Angle between/expression] <4>:
<Type in 20 and hit Return key>
CMD = Enter number of items or [Angle between/expression] <4>:
<Type in 20 and hit Return key>
CMD = Enter number of items or [Angle between/expression] <4>:
<Type in 20 and hit Return key>
Ad infinitum...
I then discovered that this only seems to happen when the cursor is left over the centre of the array you clicked on. But if it's moved to one side the correct command prompt follows the Return key. This isn't intuitive as you have to leave go of the mouse to input the required number at the keyboard, so it tends to be wherever you just clicked, and you end up in the pointless loop.
Just wondering how I would return attributes of blocks in my drawing's XRefs?
I've come across one example that is in VB but no luck.
I currently have a list in a form that consists of all the XRefs in my drawing and I wish to return all blocks and attributes that are linked to the selected XRef.
I did a brief search in this forum on the Civil 3D 2012 Interactive Shaping Terrain package previewed by Autodesk in January/February 2012, and couldn't find any recent news on this package. Is it going to be released as an add-on sometime soon? Is it already available for download, and I'm simply not aware of it? Here's a link to the latest status of the package from AutoDesk on the issue (dated 2012):
[URL].......
The following gives me the first folder string, with no back-slashes, that the drawing exists in.
(setq FirstFolder
((lambda (/ tmpDir tmpPos)
(substr
(setq tmpDir (getvar "dwgprefix"))
(+ 2 (setq tmpPos (vl-string-search "\" tmpDir)))
(- (vl-string-search "\" tmpDir (1+ tmpPos)) (1+ tmpPos))))))
Is there a way to find the name of the second folder?
Is there a way to find the name of the third folder?
The string length of the characters for each of the first, second, third (and so on) folders are different, which means I can't count character using the "substr" function.
I am wondering if there is any way to 'find & replace' a carriage return; specifically to add one in. I have figured how to take it out.
the reason I want to do this, is because 'tcount' will increment, by the amount specified, for each line of mtext; I have multiple lines of 2 line mtext, and I want to 'tcount' one number in the first line of each instance of mtext.
Now, I know I can do it manually, and in fact I would have had it done almost an hour ago if had, but this issue crops up every now and again, where if there was a fix or work-around to the 'tcount' issue (such as somehow inserting a carriage return) my efficiency could be increased.. for example I could get through renumbering 30 instances of 2 or 3 line mtext across 15 different drawings..
How to Return Borrowed License From a Different Computer.
I ordered a new computer with C3D 2013 installed. I also had C3D on my old computer and had borrowed a license from our company’s server until the end of July. C3D has since been uninstalled from the old computer without first having the license returned. Now I don’t have a license for my new computer.
Is there some way of releasing the borrowed license from the old computer? If I reload C3D back on the old computer will it recognize the old borrowed license and allow me to release it?
I sometimes create parts while working in an assembly. This hasn't been an issue but something mysterious happened. Once I create my new part, to get back to the assembly ( turn off the transparency)
I typically press the Return button which is normally in the first tab (this example shows I created a sheet metal part)but for some reason the return button is now in the inspect Tab??I tried looking through the customize ribbon form and can't seem to put the button back into the first tab?
How I could create a label for the curb return grade as shown on the attached file. The label is on a curve.
View 6 Replies View RelatedTrying to diable the spacebar = (return last command) function!
commandlinehide does te job in the working interface, but a space in scriptmode (in the filename e.g.) still repeats last command!
I am trying to replace multiple instances of a multiline text entity throughout several drawings and can’t seem to find a good way to make this come to fruition. (must use carriage return to differentiate between other instances of the text) ie
Replace:
Name
Location
Date
Vs
Replace:
Name
I need it to replace the text in the instance that has multiple text lines, and not the name where the text is on it’s own. I have seen mention of using “u+000A” as a carriage return in older versions, but I can’t get it to work.
Is there any way to build a LISP function in .Net to return a selection set?
View 1 Replies View RelatedI'm using Inventor 2013 and would like to create a dialog box requesting the parameters for a simple rectangle and be able to snap in an assembly to get the distance for each parameter (width and depth) of the shape. Is this possible with either VBA or iLogic? I just need how to get the value...I can handle the dialog box.
View 5 Replies View Relatedi gotta deliver some drawings. Problem is that when i move/copy/etc any Mtext/Multileader/Dimension in Autocad 2011 LT the text "thickens".
I googled the problem at first and found out that for the Mtext, i needed to set Z positition/Elevation to 0, in order for the text to return to normal. What i gotta do to fix the dimensions and multileaders.
The lisp routine displays point values of a boundry (window) of an object using the vla_getBoundingBox.
The concept of the routine is to select any object and return two Point window value.
This routine works, but I noticed the Z point is changing depending on the object type drawn in 2d space elevation 0.0.
Test: Open a new drawing. Set the snap value to 1.0 just to make is easy to see values.
Draw three objects: A horizonal line, A Rectangle and Arc.
Load the gbb.lsp and run it, gbb
Select all three objects and notice the results.
It appears that objects the have an curve change the Z value (very little), but Z should be zero.
Try it with a polyline and then PEdit and FIT and re-check the Z value.
How to put a (Return) or Break to another text line in a label? Usually it is one big long label on one line.
View 4 Replies View RelatedI have a dynamic flat screen tv block. Its length flexes to match the lookup table chosen size...32" 42" (the length parameter being a defined mm length) etc i want to display the 32" 42" etc items from the lookup properties table, but i'm at a loss as to how to go about it.
currently i am using an attribute with a field pointing to lookup parameter/object/lookup description string but it's returning hashes.
block.png
I have not used AC for 3d drawings in years. But I do a lot of 2d in AC2012. Yesterday, I was killing time and took a look at some of the 3d capabilities while in an existing drawing. I inserted a few 3d objects, but I eventually deleted them. Now I notice that the UCS icon has become the 3d UCS, and my snaps no longer function as expected. Is there some way to purge the 3d info and return the drawing to it's original 2d functions?
View 4 Replies View RelatedI recently wrote a lisp routine that was supposed to get the 4 coordinates of a rectangle (LWPolyline). It worked fine in *MY* tests. But when someone else ran it, the routine operated as though the order of the points had been rearranged.
How can I get the points AND the order in which they belong?
Here's a sketch to show you what I mean. As part of my troubleshooting, I had a lisp routine draw a new pline using the points gathered by my first routine. The result of that on the left. On the right is the result of that when someone else runs the two routines.
Here's the code I used to get the points.
(defun getplinepointlist(ename)
(setq ent(entget ename))
(setq ptlist (list))
(while (setq pt(cdr(assoc 10 ent)))
[code].......
Changing the curb return radius after the intersection has been created. I am able to go back to the curb return parameters dialog and enter a different value, but once I hit Enter or OK the value reverts back to the one I orginally used.
So it looks like I have to delete the intersection object and re-start the wizard from scratch. Not that it's a big deal, just thought there might be a way to make the change once the intersection is built.
I would like to find a function that returns the two objects colliding using contact sets. I'm not sure this functionality is available in the API.
View 1 Replies View RelatedI am getting assembly problem as shown in attached fig where curb return takes zero elevation . However the same assembly working fine on other intersection
View 6 Replies View RelatedI use the Repeat command with an index, and when it exits, it writes the last index.
I cannot move it to a new line,nor cancel it.
If i insert a (princ "") inside the loop it moves it to a new line, but also all the outputs of the loop get extra line spaces
I am trying to create a feature line style that would include markers similar to minor stations of an alignment at the End Points and 1/4D, 1/2D & 3/4D locations. The thought is that I could use these on curb returns, and the markers would identify the locations we provide construction staking.
View 7 Replies View RelatedI need to return the entity name of the largest (longest closed) polyline in a selection set. At this point I have no trouble creating the selection set and even getting the area of the boundingbox, which is not the most accurate way to find the true size, but it's a start. The part that has me stumped is: if I iterate through the selection set, then how can I compare one to the other when I have access to the current entity. I've been staring at examples of lambdas but it seems to me that iterating through the selection set is going about it wrong in the first place.
Below is my current code with a remaining issue. I can return the largest area of the polylines (no good for more than two entities in selection set), but I do not know how to return the entity name:
(IF (> (SETQ SS (SSGET "x" '((0 . "*POLYLINE") (8 . "POOL") (-4 . "<OR") (62 . 5) (62 . 256) (-4 . "OR>")))) 1 ) (PROGN (SETQ a (1- a) ent (CDR (CAR (SSNAME ss a))) en2 (CDR (CAR (SSNAME ss (1- a)))) ar1 (APPLY '* (LIST (LAMBDA (ent) (VLAX-INVOKE-METHOD (VLAX-ENAME->VLA-OBJECT ent) 'getboundingbox 'minpt 'maxpt) (SETQ pt1 [code]......
(layoutlist) ... returns a list of strings of the layout tabs in the drawing.I've used this ages... Isn't it a core lisp function, or is it coming from express tools or somewhere else?
View 5 Replies View RelatedI'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]....