When defining new LISP function with .NET, I think it's necessary to first check for the argument validity (number and type) and I am convinced the evaluation must stop in case of invalid inputs (as the built-in LISP function work).
For this, I use some classes which inherit from System.Exception:
using Autodesk.AutoCAD.DatabaseServices;using Autodesk.AutoCAD.Runtime;namespace LispFunctionSample{ /// <summary> /// Base exception type for LISP exceptions. /// </summary> class LispException : System.Exception { /// <summary> /// Creates a new instance of LispException. /// </summary> /// <param name="msg">The message to be displayed when LispException is thrown.
[Code] ........
These exceptions may be thrown from the LispFunction code, catched to display a message and re-raised to stop the LISP evaluation.
Example: [LispFunction("acos")] public double Acos(ResultBuffer resbuf) { try { if (resbuf == null) throw new TooFewArgsException(); TypedValue[] args = resbuf.AsArray(); if (args.Length > 1) throw new TooManyArgsException(); int code = args[0].TypeCode; if (code != (int)LispDataType.Int16 &&
[Code] ........
This works quite fine except the message in the command line is followed by an eInvalidAdsName stack trace and, in the Visual LISP console, the message is: "; error: ADS request error".
So, is there a way to avoid the eInvalidAdsName stack trace in the command line and have the thrown exception message in the Visual LISP console so that it mimics closer the built-in functions?
I have a list function that asks for the user to pick points when it is run. It looks something like this (foo arg1 arg2) When invoked it asks the user to pick points and press enter when done It.
Instead of getting the points from the user i want to pass it a list of pre-defined points. The code cannot be changed so I must use it as is.Is this possible, if so how can it be done?
BLOCK REFERENCE Layer: "TWC Dim" Space: Model space Handle = 27879
The above result from LIST > 'Last' ... gave only the above result.
We have a project... granted, the requirement is to model 1.6 million feet from world origin... I know that AutocAD can have issues with this... and we have certainly had issues on this job that can be attributed to this... BUT WHAT ABOUT THIS ISSUE?
When anything is INSERTed into this drawing file, or from this dwg file... it doesn't seem to show up... no command line errors, no OFF or Frozen layers, no objects Isolated, no indication at all that there was a problem... except that nothing showed up.
This was used to find the issue. List the last object added to the database. Then paste to original coordinates (NOT PASTE AS BLOCK)
Command: list Select objects: l 1 found Select objects:
[Code] .....
No more info.. no block name, no Handle, no Insertion point x,y,z... no scale factors, none of the normal info that should accompany the BLOCK REFERENCE LIST output.
Several Audits were done, and Recover... this reported fixing Invalid Block Refs... we even rebuilt the dwg in a blank dwg file... but still object INSERTed with this same behaviour.
I had installed the NewBlue title Ex which link one gets when one registers VS X5. Since I did not prefer the same (compared to heroglyph) i uninstalled it, but the name NewBlue Titler Ex still appears inthe drop down FX menu tab. Is there some way to remove this redundant entry?
My need is to create up to 50 points from the same origin in a three dimensional Cartesian coordinate system but I’d also like to have a labels for each point that show up in the feature tree.
Are there Inventor 2013 plugin (i.e., add-on, 3rd party, AP) to convert a list 3D Cartesian coordinate system locations (i.e., points) to Inventor to work points(x, y, z)?
I found that I cannot create 3D points in the assembly. Is this correct? I did find that an Inventor part may be used to create a 3D sketch that creates points in 3D space. In the past few days, I found two ways to create 3D points within a iPRT; the batch way uses an Excel file but it then does not allow me to name the points in the feature tree. The second way is to create them one at a time but that take way too much time.
I saw another thread on this, but it went unanswered, so I am going to ask it with some better information.I installed inventor pro 2012, and it was working fine for a few days, but it now is missing the input boxes for the Precise Input window. URL....
It was working fine. Then I just did a simple command (pattern a part) and the entire workspace blinked out. The first time it happened I hit UNDO and it was back. So I got out of the drawing and got back in and tried the pattern again. Same issue but this time when I hit UNDO it would not come back. I closed the file without saving and when I went back in the file the workspace is still nothing but white screen. In the browser everything is still visible except for those that I had already changed to invisible. I tried making an invisible to visible and nothing happened. I got out and tried opening the "old version" which should've been before any of this happened and it is also blank. I can go to an ipt or iam in the browser and hit open and it will open in another screen just fine. I just can't see my main assembly. I have Inventor 2012. It shows no errors or messages. I have even rebooted.
I looked thru the forum and found a past issue back in 2005 identical. I tried doing Find in Window on an item in the browser but for some reason that option is not even in the list when I right click.
I am UNABLE to follow a tutorial on how to make a repeatable pattern using 'texture transfer' on some fire I want to make into a pattern!!! every time I select the area I want to use and the 'input map' and paste as new image and I tell Resynthesizer to use that image it ALWAYS errors out as "The Input Map Should Be The Same Size As The Input Texture Image" according to the tutorial another person gave me on this forum he said NOTHING about being the same size!!! in fact, his selection was SMALLER than the actual image that he was using Resynthesizer on!!!
I have set the migration defaults to my part list and the pipes come in as expected but all the structures come in as null? I even went as far as setting every option to my rect junction NF and they still come in as null?
I have a iLogic rule for saving drawings (dwg) to a pdf file in a designated folder. Everything worked well until this Monday morning. Now I get the message: Error in rule: Save2PDF, in document: 13006-027 propflens-1.dwg Value cannot be null. Parameter name: path What can I do to make it work again? This weekend a windows7 update has occurred. This is the iLogic
'------start of temp i Logic------- First update settings Dim oControlDef as ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("UpdateCopiedModeliPropertiesCmd") oControlDef.Execute2(True) '------end of temp i Logic------- '------start of iLogic------- oPath = ThisDoc.Path oFileName = ThisDoc.FileName(False) 'without extension oRevNum = iProperties.Value("Project", "Revision Number")
We use a lot of Null Structures but then give them different descriptions. More often than not when I give them a description and then get out of the drawing, the next time I get back in it says "Null Structure" again. How can I keep the description the way I want it?
I know that "the right way" would be to have specific structures made for each of these items, but that doesn't seem to be a priority at my company..
A co-worker tells me when he opens a drawing then minimizes it and then opens a new drawing to fiddle around with, when he closes it and doesn't save and returns to the first drawing, when he runs commands he gets "No Null Object" errors. He can click OK or whatever on the error messages and continue, but they constantly fly in his face.
He's running AutoCAD 2011 Maps 3D x32 on Windows 7 x64.
I have set the migration defaults to my part list and the pipes come in as expected but all the structures come in as null? I even went as far as setting every option to my rect junction NF and they still come in as null? What did I miss?
Civil 3D 2012 & 2013 HP Z210 Workstation Intel Xeon CPU E31240 @ 3.30 Hz 12 GB Ram 64 Bit Win7 OS
In AutoCAD for Architecture 2010 I am having problems publishing to a DWF (DWF6 ePlot.pc3) as well as to a PDF (DWG To PDF.pc3). On one machine everything works fine. On another machine it has worked but doesn't now.
I have tried the following:
Repaired AutoCAD for Architecture Reinstalled AutoCAD for Architecture Recreated both .pc3 files Numerous reboots and restarts
The only difference is that the machine it doesn't work on has AutoCAD for Architecture 2009 installed. Both machines are XP64 SP2 with identical hardware.
I am trying to make a break-out view in an idw. I get the message "Hint Ref is NULL" no matter what I try for section depth etc. Also, I noticed that the view I am trying to break-out is not listed in the browser! Also, one of the section views is not listed either. See attached screen shot.
why a view would not show in the browser and what can the error message "Hint Ref is NULL" mean?
Some of our structure styles for null structures are set to display as a block in profile. When we label these null structures in profile, the label dimension line extends to down to zero, way off the profile view. When I change the style to display the boundary of the null, the label pops back into place, but when I change the style back to a block, it will drop back to zero. I just upgraded to 2014 and this did not occur in 2010-2013. I've upgraded a drawing with existing profiles and also created a new pipe network and the results are the same. What changed in 2014 that would cause this?
On my big plots IE with loads of hatching etc I check the option to send job as BMP which as you will know saves on the memory for the plotter. My question is, can I set this up to be permanently on for every plot? I'm simply trying to save myself time when I have to check that option. instances where I forget to check it and sit for 10 minutes waiting for the plotter to fire up
i did a Locator (Null) and parented to the Head Bone.this is where i am going to parent the sphere geometry of the eye.
but i cant find the way to mirror this Locator to the other side for the other eye.i try with Duplicate special, -x but it does it on its own, the only different is the scale is -X but didn't move from the original position, and the 2 are overlap.
how do i mirror / duplicate the Locator to the other side?
I was trying to write a code to save an ai document as eps, when the need to turn the Format option to None arose. Here is a screenshot to better describe my question.
I looked in the class AINativeAction.h but wasn't able to find a suitable key to match to turn this option off programmatically.
I have a button on the main stage with a hit event inside of it. This hit area calls frame lables on other symbols (these "other symbols" are also on the main stage, not dynamic) . How do I make the click event of the hit area null if one of these symbols is/are visible? I added another button to set the visibility to false but then I also need the click event to reset itself to it's original state
When I run my VBA routine from the VBA editor, the command appears in the text window of AutoCAD the way it should, but when I run the routine with the VBAload - VBArun commands (automated on a toolbar button), it does not. Do I need to obtain the AutoCAD object and issue commands that way instead of using the thisdrawing.utility method?
im trying to send a dwg file with pictures which but the pictures dont show up. i created a zip file using the etransmit option and the pictures show up in the file but you can not see the actual picture on the dwg file, only its path. is there a way i can send the file that the picture shows up on the dwg?
I have to two sheets layed out in one drawing in Auto CAD 2012, a tilte sheet and the building plan. How can I send that to one PDF file (one PDF file with both sheets) using the 'DWG to PDF.pc3' option?