相当不错的批量处理iLogic规则的工具

从插件执行iLogic规则 iLogic已经广泛的得到应用,很多用户或者开发者都很亲睐。iLogic并不是万能de , 有些时候,我们可能需要把iLogic和Inventor API开发的插件结合起来。这时就存在一个问题,如何从Inventor API程序调用iLogic,并执行其中的规则? 其实,Inventor提供了iLogic相关的接口,在\bin\Autodesk.iLogic.Automation.dll 和 A 阅读详情

碰到个客户,他们以前的图纸里有自动宏,可以在打开或关闭时自动做些事情。如在另外一篇博客提到的,Inventor2014以上不再支持自动宏,需要将原有的流程移植为Inventor事件。http://blog.youkuaiyun.com/autodeskinventorapi/article/details/9419875

但,使用Inventor事件,需要用户具备API开发技能。可能有些用户就望而却步了。有用户巧妙的把流程改造为iLogic,即添加iLogic规则,然后设置对应的触发器(iTrigger)。 这样,也能达到目的。

可是,问题又来了。要是有成千上万的图纸呢?总不能一个个的打开去加规则吧。

于是,我在想写个小程序,能批量添加规则,毕竟,这方面的API是具备的。不过,这里有比较多的细节,例如,需要制定原始文件夹,能遍历子文件夹,需找需要操作的文件,导入规则,设置触发器,以及可能的无效场景控制等等。我有点犹豫是否要投入时间。突然发现一个博客,已经有人做了一个批量工具了!!兴奋之情溢于言表!这个工具几乎把每个细节都考虑到了,而且界面简洁,清楚。当然,即便不是处理自动宏,只要是批处理添加规则,都用得上。

原文地址:
http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html

我将其改造后,能支持规则中文名,并增加一项【是否忽略无特定的参数文件】,即如果文件参数中没有height,length,width,则不做规则的添加(这是为联系我的那个用户提供的)。有些按钮名也做了翻译。

原文中有代码下载。这里是修改后的代码工程。

http://download.youkuaiyun.com/detail/autodeskinventorapi/8196813


若是最终用户,解压后,运行 Release文件下的Code Injector.exe。 请确保机器上已经安装了至少Inventor 2013以上的版本。


再次感谢原文作者! (Appreciate the author of the original article!)


 

FPGA I/O Bank选型指南:HP、HR、HD核心差异与实战设计 在数字电路与可编程逻辑设计中,I/O接口是连接FPGA与外部世界的关键桥梁,其性能直接影响系统稳定性和信号完整性。FPGA的I/O并非均质,而是被组织成具有不同电气特性的Bank组,每个Bank共享供电和关键资源,这一设计旨在平衡性能、功耗与成本。理解Bank的差异,本质上是掌握FPGA如何为高速、宽电压或高密度等不同应用场景提供差异化支持。从原理上看,高性能HP Bank采用特殊晶体管工艺,支持高速收发器与内存接口,但电压范围窄;高范围HR Bank则提供宽电压兼容性,适用于连接多种传统外设;而HD Ba 阅读详情

相关推荐

巧用api提升钣金设计装配 1 - iLogic与Inventor API

上周四我们举办了讲座【活动】AU大师汇在线研讨会-巧用api提升钣金设计装配. 讲座的材料和视频需要等待一些时候上载完毕。这里我将其中的内容逐次贴出来,供大家参考。 课程首先介绍到iLogic也是一种Inventor API的访问方式,只是提供了编译环境,以及预定义的封装函数。     而且iLogic中基于VB.NET语法,因此VB.NET的语法规则都是可以使用的。需要特别提

Gear Up Cloud 2086

Inventor 二次开发从入门到精通(11)iLogic 与规则开发

入门门槛低:基于 VB 脚本,语法简单,无需编译,直接在 Inventor 中运行;与参数化深度集成:可直接访问和修改模型参数、特征、装配约束等;可视化编辑:内置 iLogic 编辑器,支持语法高亮、代码折叠;事件驱动:支持模型变更、文档打开 / 关闭等事件触发规则;轻量化:无需创建独立插件,规则直接存储在文档中。

CAD设计软件开发博客 1815

inventor批量添加iLogic规则

inventor批量添加iLogic规则,从http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html复制,做了汉化和一些修改。

Inventor iLogic 规则_关闭定位特征和草图可见性

'此规则关闭每个定位特征和草图的可见性 '设置目标文档 oDoc = ThisApplication.ActiveEditDocument '设置工作平面可见性 For Each oWorkPlane In oDoc.ComponentDefinition.WorkPlanes oWorkPlane.Visible = False Next '设置工作轴可见性 For Each oWorkA...

捡得有的博客 2022

iLogic规则批量处理

可批量为Inventor文件添加Rule。从http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html 下载,并做了一定的修改

ROC-RK3588S-PC 刷机 安装Android系统

rk3588刷机,装系统

Wjz_www的博客 4834

inventor illogic 规则运行时提示规则编译错误,找不到.dll文件

inventor ilogic规则编译错误,找不到.dll文件

qq_28147827的博客 455

OpenFOAM算例文件结构深度解析:以cavity案例为例教你读懂每个文件夹的作用

本文以OpenFOAM经典cavity案例为例,深度解析CFD算例文件结构。详细阐述了0、constant、system三个核心目录的作用:0存放初始与边界条件,constant定义物理属性和网格,system控制求解策略。通过剖析关键文件,帮助用户理解每个参数的意义,掌握从读懂到定制算例的能力,为高效使用这一开源CFD工具奠定坚实基础。

beer8的博客 238

浅谈Inventor2023-实用功能大揭秘~

在Inventor的这一最新版本中,开发者更新了很多功能,例如Fusion 360 互操作性,能够快速访问和启动Inventor 到 Fusion 360 工作流,包括衍生式设计、仿真、电子和制造。Inventor是一款功能强大的机械设计软件,需要自动化的专业工具,来设计和准备制造的机械工程师们, Inventor用起来!Inventor 2023的文档增强功能,通过视图创建、基于模型的定义和三维标注的更新,更清晰地了解将要投入生产的设计。熟悉CAD三维的朋友都知道,它的最佳拍档。

a17312592059的博客 7053

攻防世界-Reverse-Game

攻防世界,game,逆向

wuh2333的博客 775

【异常】Cursor 编辑器 “Too many computers“ 报错排查与完整解决方案

该报错通常在启动Cursor、调用AI对话/代码补全核心功能时触发,会直接阻断编辑器AI能力的正常使用。

奶爸的编程之路,也就一周冷个三天 457

Cadence orcad 批量设置原理图标题栏

Cadence orcad 批量设置原理图标题栏

YY_Share的博客 2万+

基于coze studio开源框架二次定制开发教程

CozeStudio是一站式AIAgent开发工具,支持大模型接入、智能体编排、工作流开发等功能。采用Golang+React技术栈,基于微服务架构设计。项目包含后端API、领域逻辑、前端应用等模块,支持自定义任务流节点开发。开发流程涵盖前后端节点定义、实现逻辑编写等步骤,提供完整的开发规范和参考文档。相比商业版,开源版本在功能上有所精简,但仍保留核心开发能力。

coding change your life 790

PADS Logic批量修改添加显示隐藏Value、Comment值、 封装

PADS Logic批量修改添加显示隐藏Value、Comment值、 封装 ProjectExploreer->选择CAE Decalcs,选中其中任意一个->Ctrl+Q打开Part Properties->选中Visibility、Attributes、PCB Decals进行相应的修改 如下图: 同理选中PCB Decalcs也可以进行操作 ...

zerothpower的博客 5504

使用ESP32设计嵌入式蓝牙游戏手柄

通过使用ESP32开发板和相关的库,我们可以设计和实现嵌入式蓝牙游戏手柄。连接到该设备后,您可以使用控制器模块的按钮和摇杆等元件来模拟游戏手柄的输入。根据您使用的具体模块和引脚分配,连接按钮和摇杆等控制元件到ESP32的GPIO引脚。ESP32是一款功能强大的微控制器,集成了Wi-Fi和蓝牙功能,非常适合用于开发物联网和嵌入式应用。请注意,本文仅提供了一个基于ESP32的嵌入式蓝牙游戏手柄设计示例,具体实现可能因硬件和需求而有所不同。确保开发板正确连接到计算机,并选择正确的开发板和端口。

CodeMaven的博客 1642

22、嵌入式软件随机延迟生成与加密算法防护技术

本文探讨了嵌入式软件中的随机延迟生成方法与块密码软件实现的高阶掩码及洗牌技术。重点介绍了浮动均值延迟生成方法,其在8位AVR平台上的实现效率为Θ(1),显著提升了抗相关功率分析(CPA)攻击的能力,相比传统方法更安全且轻量。同时,分析了高阶掩码与洗牌技术结合的方案,通过理论建模量化其对高级差分功率分析(DPA)攻击的抵抗能力,并以AES为例展示了该方案的应用流程。最后对比了不同防护技术在安全性与开销之间的权衡,为实际应用中选择合适的安全策略提供了依据。未来可进一步优化实现效率并融合多种防护手段以应对复杂安全

fern8的博客 88

ILOGIC 资源是什么?

DCI:Digitally-controlled impedance 数字控制阻抗 HP :高速\高性能 HR :宽电压范围 ILOGICE2 ILOGICE2本身不是原语,不能例化。我们只能使用其内部资源例如:单边沿D触发器、IDDR(有3种模式)、latch、组合逻辑。 ILOGICE2 在HP bank & 无ZHOLD ILOGICE3 在HR bank &ZHOLD ...

1615549892 750

【CloudCompare教程】017:点云快速全局配准

点云数据的配准分为基于特征(特征点、特征线)的拼接和无特征拼接。特征点匹配的方法和全局ICP的方法。特征点的方法通过全局特征匹配达到全局配准,全局ICP的方法通过对变量空间进行搜索的方法达到全局最优解。

智慧空间实验室 3929

FPGA - 7系列 FPGA内部结构之SelectIO -03- 逻辑资源之ILOGIC

本文主要翻译节选自UG471,主要对7系列FPGA SelectIO逻辑资源进行简要介绍,然后介绍了内部的SelectIO逻辑资源的ILOGIC 资源。

Vuko_Coding Zone 3323

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

inventor宏写入属性

写入属性

weixin_57217890的博客 589

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

宏的录制和运行

首先,我们要找到“开发工具”选项卡。该选项卡默认为不显示。因此,我们需要在Excel选项中将其设置为显示状态。具体步骤如下:“文件”——“选项”——“自定义功能区”——在主选型卡对话框下的开发工具前打勾——“确定”然后,开始宏的录制。在“开发工具”选项卡下选择“代码”组中“录制宏”按钮,打开“录制新宏”对话框,并填写相关内容。说明:1、快捷键组合规则:Ctrl+小写字母;Ctrl+Shift+大写...

qq_42127592的博客 1762

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

Inventor iLogic 规则_激活指定详细等级

Dim oDoc As AssemblyDocument = ThisDoc.Document Dim oDef As ComponentDefinition = oDoc.ComponentDefinition Dim ActLOD As String = oDef.RepresentationsManager.ActiveLevelOfDetailRepresentation.name...

捡得有的博客 1614

xilinx7系列FPGASelectIO篇(2)_IO逻辑资源简介

上篇咱们简单的说了I/O的电气特性,本篇咱们接着介绍I/O逻辑资源,先贴上两张图。图1为HPBANK的I/O模块,图2为HRBANK的I/O模块,两者区别在于后者无ODELAYE模块。 图1:HP BANK I/O模块 ...

一个早起的程序员 3238

Inventor iLogic 规则_激活列表详细等级

Dim oDoc As AssemblyDocument = ThisDoc.Document Dim oDef As ComponentDefinition = oDoc.ComponentDefinition Dim ActLOD As String = oDef.RepresentationsManager.ActiveLevelOfDetailRepresentation.name...

捡得有的博客 1390
上一篇: 高亮装配中发生干涉的部分
下一篇: 创建不同类型的用户参数
autodeskinventorapi
博客等级 码龄14年 313粉丝 164原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值