Recent Posts

Pages: [1] 2 3 ... 10
1
Also, tangentially related and as a heads up because, yes, I had the curiosity to try this:

If you have AutoCAD or FabAPI libraries loaded or even referenced in a Revit AddIn project, as long as it doesn't stumble onto that code, it's fine. Revit won't care.

However, if you so much as load RevitAPI stuff into a CAD solution, CAD does not like it. AutoCAD starts acting real insecure when it comes to Revit.
2
Fabrication Parts in Revit® / Re: Revt Fabrication CID List
« Last post by Admin on Yesterday at 07:55:57 PM »
Easily accessed under Additional Content in the right hand column on the Portal Index Page:
CID List by Version
4
CADmep™ Users / Strange Database Error
« Last post by dopefish on Yesterday at 07:35:09 PM »
So I have an old database that I am phasing out. We started some projects with it and now I have to provide support for it until we can put it in it's grave. So we made a networked copy of it so some of our mobile guys can use it. I have some items that show up just fine in the Service Palette but when I use the folders command and navigate to their location I can't see the files. I tried adding a new model and navigated to the files and received an error saying the file "does not contain shell information". This is new territory for me and I'm at a loss. I need to edit these files and have no access to them. Thoughts?
5
Fabrication Parts in Revit® / Revt Fabrication CID List
« Last post by cadbob on Yesterday at 07:26:38 PM »
Does anyone have the Revit 2019 Compatible CID List?
6
Currently I've got a giant static class called FabMethods where most of my Fabrication API code lives. If AutoCAD, Revit, CAM, or EST need to create a Custom Data for example, they all call the exact same code, FabMethods.CreateCustomData().
7
Sorry to hear that trying to avoid AutoCAD specific code in run time doesn't work, and we need to physically segregate the AutoCAD specific code into their source code file.  Seem like .NET C# run time module interprets the entire source code file whenever it needs to run some program in the source code file for the first time -- instead of interpreting each individual line in the source code file as needed.  That "may" be the reason why using if-then statement to avoid AutoCAD specific code doesn't work.  I am glad that you have tried and shared your experience.  Then I don't need to repeat the same mistake.

Jaysom
8
General Programming Queries / Create an AutoCAD Plugin Bundle
« Last post by jaysomlam on Yesterday at 03:30:36 PM »
I am trying to create a plugin bundle for a small program library written in C# .NET and Fabrication API.  So far I cannot get the plugin to show up in the "addin" tab of the Ribbon window in CADmep 2018 (running on AutoCAD 2018).

The program library (MyLib.dll) has 2 commands (MyLib_CreateGroup and MyLib_SelectGroup).  The commands work fine.  I can manually load the DLL using NETLOAD without any problem, and I can manually invoke the commands through the command line.  Now I am trying to get those 2 commands to show up in the "addin" tab of the Ribbon window.  I see that Fabrication Sample from the SDK is deployed using .bundle.  I simply copy the Fabrication Sample bundle folder to C:\ProgramData\Autodesk\ApplicationPlugins folder, and it shows up in the Ribbon window.  This is simple enough for deployment.  I am trying to mimic the Fabrication Sample bundle and use it to deploy mine.

Unfortunately Visual Studio 2012 doesn't have a New Project Wizard for creating a setup program.  I have to create the plugin bundle manually.  I figure that cannot be that hard to create a PackageContents.xml file by hand.  Unfortunately that doesn't work.  There is no error message. But my plugin doesn't show up in Ribbon, and the program library are not loaded in AutoCAD either (meaning that those 2 commands are not available).  I am hoping that someone can tell me what goes wrong and how to fix this.

Those 2 commands are defined like this:

Code: [Select]
   .
   .
   [CommandMethod("MyLIb_CreateGroup")]
    private void CreateGroup()
      {
      ...
      }

   [CommandMethos("MyLib_SelectGroup")]
   private void SelectGroup()
      {
      ...
      }
   .
   .

The structure of the bundle folder is like this:

Code: [Select]
C:\ProgramData\Autodesk\ApplicationPlugins\MyLib.bundle
   |
   |--> PackageContents.xml
   |
   |--> Contents
        |
        |--> MyLib.dll

And the PackageContents.xml is this:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<ApplicationPackage
   SchemaVersion="1.0"
   AppVersion="1.0.0"
   Name="MyLib"
   Description="My library of programs to work in CADmep and CAMduct."
   ProductCode="{...GUID Generated by Visual Studio...}"
   >

   <CompanyDetails Name="XYZ Company" />

   <Components>
<ComponentEntry AppName="MyLib" AppDescription="My Program Library"
                      ModuleName="./Contents/MyLib.dll" LoadOnAutoCADStartup="True">
<Commands GroupName="MyLib">
<Command Local="MyLib_CreateGroup" Global="MyLib_CreateGroup"/>
<Command Local="MyLib_SelectGroup" Global="MyLib_SelectGroup"/>
</Commands>
</ComponentEntry>
   </Components>
</ApplicationPackage>

Please let me know if there is something that I should try to make this to work.

Thanks.

Jaysom
9
I don't know if this is exactly the issue but I can say that the following worked for me.

Let's say I had a method that needed to work in both applications, CAM and CAD. But in CAD, it needs to lock the document.

I could tell the method that if the host process name contains "CAM", skip the document lock, go straight to the editing of the fab items.
NOPE. Bad dog.

I would have to have a method that does whatever needs to happen for CAM. Then I'd make another method for CAD that locks the document, then calls the previous function to do the operation.

Long and short seemed to be this: Write your methods as best you can so that they do not call anything AutoCAD related. Then, for your CAD needs, point out to those methods between document locks, selection references, etc. Methods seemed to insulate well against these exceptions.

10
Thanks for the suggestion to keep code that uses AutoCAD away from code that will be used in both CADmep and CAMduct.  I am about to work on programs that will need to run on both CADmep and CAMduct.  I will definitely keep this in mind.

Jaysom
Pages: [1] 2 3 ... 10