Advance Steel Forum
Welcome to Autodesk’s Advance Steel Forums. Share your knowledge, ask questions, and explore popular Advance Steel topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Advance Steel .NET API Walkthroughs are now available!

36 REPLIES 36
Reply
Message 1 of 37
manolic
5370 Views, 36 Replies

Advance Steel .NET API Walkthroughs are now available!

Hello Everyone,

 

New Advance Steel .NET API walkthroughs are now available here



Cosmin Manoliu

Senior Manager, Engineering
36 REPLIES 36
Message 21 of 37
DarrenP
in reply to: Anonymous

its here:

Help: Advance Steel API Guide
http://help.autodesk.com/view/ADSTPR/2017/ENU/?guid=GUID-E1F6E27F-4942-4683-9368-76AD9F1E6016

DarrenP
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

Message 22 of 37
Anonymous
in reply to: DarrenP

This will likely be tremendously helpful.

 

Do you know if they were/are going to update the walkthrough titled Joints? There's a piece of code in teh 2016 one that doesn't work.

 

Thanks for the link!

Message 23 of 37
Anonymous
in reply to: DarrenP

Hello,

I have installed Autodesk Adavance steel 2018 64 bit 30 days trial version. I tried to create 'Hello World' plugin with help of http://help.autodesk.com/view/ADSTPR/2017/ENU/?guid=GUID-A4DA627E-6680-4388-9C04-79F5F3D9D075

 

I face below difficulties

1) There is no "C:\Program Files\Autodesk\Advance Steel 2018" folder. But I observed  "C:\Program Files\Autodesk\AutoCAD 2018" folder. 

2) ASNetRuntime.dll,ASMgd.dll, ASCADLinkMgd.dll, ASGeometryMgd.dll, ASProfilesMgd.dll, ASModelerMgd.dll, ASObjectsMgd.dll file are available in "C:\Program Files\Autodesk\AutoCAD 2018\ADVS" folder. But in the guide it is mentioned as folder structure Kernel\bin or common\bin folders

3) When I build the plugin and load into Advance Steel 2018 it loads without error but custom command "HelloWorld" can not run and gets error of "Unknown command"

4) When run from VS 2015 debug "NetLoad" loads without error and debug points also enabled but "HelloWorld" is missing in the command.

 

5) Also "HKEY_LOCAL_MACHINE\Software\Autodesk\AdvanceSteel\2017\Environment\BinPath" is missing in my registry. Please see attached screenshot.

 

6) Why there is no folder created "C:\Program Files\Autodesk\AdvanceSteel\2018" after Advance Steel installation.

 

Can anyone solve this mistery? I believe Advance Steel 2017 and 2018 API guide are similar.

 

Thanks in advance,

Message 24 of 37
ChristianBlei
in reply to: Anonymous

Hi,

 

The problem with API help is that it says it is help/ knowledgebase for the AS 2018 API but it is still the help for AS 2017 API. There is also no AS 2018 SDK avaiable yet. It will be released soon.

AS 2018 has a different folder structure than AS 2017 as you realized. As 2018 gets loaded similar to all AutoCAD verticals. So can aslo debug starting the acad.exe and loading AS with it.

I asked the question where the location of the XML files for the registering at start should be in AS 2018. I am waiting for an answer When I know that I will post it here. To load plugins and register their commands in As 2018 you can use the command "AstorLoadAsNetPlugin".

 

 

HTH for the time being

Christian Blei

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
Message 25 of 37
Anonymous
in reply to: ChristianBlei

Hello Christian,

Thanks for the clarification. I used 'C:\Program Files\Autodesk\AutoCAD 2018\acad.exe' to debug the dll and it works perfectly. I thought there is some error in AS2018 installation. Please let us know when AS2018 API guide available.

 

Does that mean in the AS, we should use  'AstorLoadAsNetPlugin' instead of 'Netload' command to load the .NET dll

 

Thanks

Message 26 of 37
ChristianBlei
in reply to: Anonymous

Hi,

 

As support told me that although As commands and Ac commands look similar, As commands are not wrapped Ac commands. The intention of the As API design is to be independent of Ac. You should be able to ceate commands and joints using only Ac references. At least in theory...

Of course you can mix As and Ac references. You can use the Ac IExtensionapplication structure to create commands that you then canload and register with "Netload". But if you use the AS IExtensionapllication, the option is "AstorLoadAsNetPlugin".

 

HTH,

Christian Blei

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
Message 27 of 37
ChristianBlei
in reply to: Anonymous

HI,

 

in C:\Program Files\Autodesk\AutoCAD 2018\ADVS there is a ASSettings_Advance.xml file. You can register your addins by creating a new node within NEtAddins following the structure of the other entries there. Your dll should be in atrusted location. I have mine in ADVS to add a little bit more confusion to this folder....;-)

 

My entry is CBT...

 

 

<Key Name="NETAddins">
<Key Name="Navisworks">
<Value Name="InstallLocation" Type="String">C:\Program Files\Autodesk\AutoCAD 2018\ADVS\NavisworksExport.dll</Value>
</Key>
<Key Name="ASModellingExtensions">
<Value Name="InstallLocation" Type="String">C:\Program Files\Autodesk\AutoCAD 2018\ADVS\ASModellingExtensions.dll</Value>
</Key>
<Key Name="AsToFabtrol">
<Value Name="InstallLocation" Type="String">C:\Program Files\Autodesk\AutoCAD 2018\ADVS\AsToFabtrol.dll</Value>
</Key>
<Key Name="IFC">
<Value Name="InstallLocation" Type="String">C:\Program Files\Autodesk\AutoCAD 2018\ADVS\IFCPlugin.dll</Value>
</Key>
<Key Name="CBT">
<Value Name="InstallLocation" Type="String">C:\Program Files\Autodesk\AutoCAD 2018\ADVS\CBT_AS_HelloWorld.dll</Value>
</Key>
</Key>

 

 

 

 

HTH

Christian Blei

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
Message 28 of 37
Anonymous
in reply to: ChristianBlei

Thanks it works.

 

Just a observation, AS2017 APIs are missing in AS2018. Waiting for AS2018 API guide.

 

Thanks,

Message 29 of 37

Hi,

 

Mihai Dobrescu of Autodesk mentioned two more options to register .Net Plugins:

 

best regards

Christian Blei 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
Message 30 of 37
Buxtehude1963
in reply to: manolic

Hi,

 

I have problems with Visual Studio Community 2017, Advance Steel and Graitec PowerPack: when I launch the program by loading Advance Steel from Visual Studio, Advance Steel stops responding with the following message: unhandled exception of the 'System.ExecutionEngineException' type in GrtcSteelPackPlugin.dll.
If I uninstall the PowerPack, everything works properly.
Does anyone have any news about it?

 

Thanks

 

Message 31 of 37

Hi,

 

 

I have the same issue and uninstall the Power Pack when I write code.

Maybe one of the Graitec employees could check with Graitec development.....

 

Christian

 

 

 

@AleckGiles

@handjonathan

@Sebastian_Eiche

 

 

 

 

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
Message 32 of 37
phliberato
in reply to: ChristianBlei

I had the same problem....

Message 33 of 37
Anonymous
in reply to: ChristianBlei

 

This gave me a lot of work, until I find this post...

Thank you @ChristianBlei!

 

So to save time for someone else, here's the complete GetStraightBeam function rewritten:

private StraightBeam GetStraightBeam()
{
    //Try to get a beam repr using AutoCad selection window
    var ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
    var acSSPrompt = ed.SelectCrossingWindow(new Point3d(0, 0, 0), new Point3d(1000, 0, 0));

    if (acSSPrompt.Status != PromptStatus.OK)
        return null;

    var beam = acSSPrompt
        .Value
        .GetObjectIds()
        .Select(id => id.Handle.ToString())
        .Select(id => FilerObject.GetFilerObjectByHandle(id))
        .Select(id => id.GetObjectId())
        .Select(id => DatabaseManager.GetFilerObjectId(id, false))
        .Select(id => DatabaseManager.Open(id))
        .Where(obj => obj.Type() == FilerObject.eObjectType.kStraightBeam)
        .Cast<StraightBeam>()
        .FirstOrDefault();

    return beam;
}
Message 34 of 37
Anonymous
in reply to: ChristianBlei

ok... from my side GetFilerObjectByHandle doesn't throws any exception, but the result is null... 😞

Message 35 of 37
Anonymous
in reply to: Anonymous

Never mind...

When I updated from AS2016 to AS2018, I can see ASObjectId(id.OldIdPtr) implemented.

Message 36 of 37
ChristianBlei
in reply to: Anonymous

Hi,

beginning with AS 2019 you need to start and commit a transaction in ADVS to access ,edit, create Objects.

Before a transaction was opened automatically when you started a command and commited when the command ended.It is explained in the knowledgebase here.2019-08-02_12h01_53.png

HTH,

Christian Blei

Christian Blei
CBT Christian Blei Tools
christianblei.de
youtube.com/channel/UCxjA_NbeScQy9C0Z1xjwXpw
Message 37 of 37
ti_eduardo
in reply to: manolic

Hello!

Do you know of any way to Enable/Disable the "Single part" option within the "Output" Ribbon, in the "Numbering" option in the "Special" section?

I'm trying to find the correct parameter via the API, but without success.

I'm trying with this code:

Autodesk.AdvanceSteel.Services.EqualPartsParameters test = Autodesk.AdvanceSteel.Services.EqualPartsParameters.GetCurrentParameters();
test.DetectSingleParts = true;

The attached image contains the option I would like to change.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report